/* Genel Reset ve Temel Stiller */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Inter', system-ui, -apple-system, 'Roboto', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Ana Panel (index.html) için arkaplan */
body.index-page {
    background: linear-gradient(145deg, #0a0f1e 0%, #0c1222 100%);
}

/* CPM Panel (cpm1, cpm2) için arkaplan */
body.cpm-page {
    background: linear-gradient(135deg, #0a0e1a 0%, #0f1422 50%, #0a0e1a 100%);
}

body.cpm-page::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(0, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

/* Dashboard Kart (index.html) */
.dashboard {
    max-width: 700px;
    width: 100%;
    background: rgba(18, 25, 45, 0.75);
    backdrop-filter: blur(12px);
    border-radius: 3rem;
    padding: 2rem 2rem 2.8rem 2rem;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(66, 153, 225, 0.2);
    transition: all 0.2s ease;
    border: 1px solid rgba(78, 138, 255, 0.25);
}

.title-area {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.glow-text {
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #FFFFFF 0%, #B9E0FF 40%, #4E8AFF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 5px rgba(0, 20, 80, 0.3);
}

.badge-sub {
    display: inline-block;
    background: rgba(78, 138, 255, 0.18);
    backdrop-filter: blur(4px);
    padding: 0.3rem 1rem;
    border-radius: 60px;
    margin-top: 0.8rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #9bbdff;
    border: 1px solid rgba(78, 138, 255, 0.4);
}

.info-panel {
    background: rgba(10, 16, 28, 0.7);
    border-radius: 1.8rem;
    padding: 1.2rem 1.5rem;
    margin-bottom: 2.5rem;
    border-left: 4px solid #4e8aff;
    font-size: 0.95rem;
    color: #cbd5ff;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.info-icon {
    font-size: 1.6rem;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1.8rem;
    justify-content: center;
    margin: 1.5rem 0 1rem 0;
}

.cpm-btn {
    flex: 1;
    min-width: 210px;
    background: linear-gradient(115deg, #111927, #0e1424);
    border: none;
    padding: 1.2rem 1rem;
    border-radius: 2rem;
    font-size: 1.4rem;
    font-weight: 700;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(78, 138, 255, 0.3);
    color: #eef4ff;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
}

.cpm-btn span:first-child {
    font-size: 1.6rem;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.3));
}

.btn-tool1 {
    background: linear-gradient(125deg, #0a1428, #09102c);
    border-bottom: 3px solid #3b82f6;
}

.btn-tool2 {
    background: linear-gradient(125deg, #0f142c, #0a1028);
    border-bottom: 3px solid #8b5cf6;
}

.cpm-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 28px -8px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(78, 138, 255, 0.6);
    filter: brightness(1.05);
}

.cpm-btn:active {
    transform: translateY(2px);
    transition: 0.05s linear;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.footer-note {
    text-align: center;
    margin-top: 2.4rem;
    font-size: 0.75rem;
    color: #6d7b9e;
    border-top: 1px dashed rgba(78, 138, 255, 0.25);
    padding-top: 1.5rem;
    letter-spacing: 0.3px;
}

/* Container (cpm1, cpm2) */
.container {
    background: rgba(18, 25, 45, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    width: 100%;
    max-width: 520px;
    transition: all 0.3s ease;
}

.container:hover {
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
}

/* CPM1 özel border */
.container.cpm1-container {
    border: 1px solid rgba(255, 100, 0, 0.3);
}

.container.cpm1-container:hover {
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 100, 0, 0.5);
}

/* CPM2 özel border */
.container.cpm2-container {
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.container.cpm2-container:hover {
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 255, 255, 0.3);
}

/* Header */
.header {
    padding: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cpm1-container .header {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    border-bottom: 1px solid rgba(255, 100, 0, 0.3);
}

.cpm2-container .header {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    animation: pulse 4s ease-in-out infinite;
}

.cpm1-container .header::before {
    background: radial-gradient(circle, rgba(255, 100, 0, 0.15) 0%, transparent 70%);
}

.cpm2-container .header::before {
    background: radial-gradient(circle, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.header-content {
    position: relative;
    z-index: 1;
}

.logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 16px;
    overflow: hidden;
}

.cpm1-container .logo {
    border: 2px solid rgba(255, 100, 0, 0.6);
    box-shadow: 0 0 20px rgba(255, 100, 0, 0.3);
}

.cpm2-container .logo {
    border: 2px solid rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header h1 {
    font-size: 28px;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.cpm1-container .header h1 {
    background: linear-gradient(135deg, #ff6400, #ffaa00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cpm2-container .header h1 {
    background: linear-gradient(135deg, #00ffff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    font-size: 12px;
    opacity: 0.7;
    color: #94a3b8;
}

/* Form Container */
.form-container {
    padding: 32px;
}

.input-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 10px;
    color: #cbd5e1;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
}

input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s;
    outline: none;
    color: #e2e8f0;
    font-family: inherit;
}

.cpm1-container input {
    border: 1px solid rgba(255, 100, 0, 0.3);
}

.cpm2-container input {
    border: 1px solid rgba(0, 255, 255, 0.3);
}

input:focus {
    border-color: #ff6400;
    box-shadow: 0 0 0 3px rgba(255, 100, 0, 0.1);
    background: rgba(15, 23, 42, 1);
}

.cpm2-container input:focus {
    border-color: #00ffff;
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.1);
}

input::placeholder {
    color: #475569;
}

button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.cpm1-container button {
    background: linear-gradient(135deg, #ff6400 0%, #ffaa00 100%);
    color: #0a0e1a;
}

.cpm2-container button {
    background: linear-gradient(135deg, #00ffff 0%, #ff00ff 100%);
    color: #0a0e1a;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

button:hover::before {
    left: 100%;
}

button:hover {
    transform: translateY(-2px);
}

.cpm1-container button:hover {
    box-shadow: 0 10px 25px -5px rgba(255, 100, 0, 0.3);
}

.cpm2-container button:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 255, 255, 0.3);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.king-rank-btn {
    color: white;
}

.cpm1-container .king-rank-btn {
    background: linear-gradient(135deg, #ff4400 0%, #ff8800 100%);
}

.cpm2-container .king-rank-btn {
    background: linear-gradient(135deg, #ff0080 0%, #ff4d4d 100%);
}

.logout-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.message {
    margin-top: 24px;
    padding: 12px 16px;
    border-radius: 12px;
    text-align: center;
    font-size: 14px;
    display: none;
    backdrop-filter: blur(10px);
}

.message.success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.message.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.message.info {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.user-info {
    text-align: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 16px;
    margin-bottom: 24px;
}

.cpm1-container .user-info {
    border: 1px solid rgba(255, 100, 0, 0.2);
}

.cpm2-container .user-info {
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.user-info p {
    margin: 8px 0;
    color: #cbd5e1;
}

.user-info strong {
    font-size: 16px;
}

.cpm1-container .user-info strong {
    color: #ff6400;
}

.cpm2-container .user-info strong {
    color: #00ffff;
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
}

.cpm1-container .divider::before,
.cpm1-container .divider::after {
    background: linear-gradient(90deg, transparent, rgba(255, 100, 0, 0.3), transparent);
}

.cpm2-container .divider::before,
.cpm2-container .divider::after {
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.3), transparent);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider span {
    background: rgba(18, 25, 45, 0.95);
    padding: 0 12px;
    color: #64748b;
    font-size: 12px;
    letter-spacing: 1px;
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.action-buttons button {
    flex: 1;
    margin-top: 0;
    padding: 12px;
    font-size: 14px;
}

.small-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
}

.forgot-link {
    text-align: center;
    margin-top: 16px;
}

.forgot-link a {
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s;
    opacity: 0.7;
}

.cpm1-container .forgot-link a {
    color: #ff6400;
}

.cpm2-container .forgot-link a {
    color: #00ffff;
}

.forgot-link a:hover {
    opacity: 1;
}

.cpm1-container .forgot-link a:hover {
    text-shadow: 0 0 8px rgba(255, 100, 0, 0.5);
}

.cpm2-container .forgot-link a:hover {
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

/* Modal Stilleri */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: rgba(18, 25, 45, 0.98);
    backdrop-filter: blur(20px);
    padding: 32px;
    border-radius: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.cpm1-container .modal-content {
    border: 1px solid rgba(255, 100, 0, 0.3);
}

.cpm2-container .modal-content {
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.modal-content h3 {
    margin-bottom: 24px;
    font-size: 22px;
    text-align: center;
}

.cpm1-container .modal-content h3 {
    color: #ff6400;
}

.cpm2-container .modal-content h3 {
    color: #00ffff;
}

.modal-content .input-group {
    margin-bottom: 20px;
}

.modal-content button {
    margin-top: 16px;
}

.modal-content button:last-of-type {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    margin-top: 12px;
    color: white;
}

.modal-content p {
    color: #94a3b8;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 550px) {
    body {
        padding: 1rem;
    }
    
    .dashboard {
        padding: 1.5rem;
    }
    
    .glow-text {
        font-size: 2.2rem;
    }
    
    .cpm-btn {
        font-size: 1.2rem;
        padding: 0.9rem 0.8rem;
        min-width: 160px;
    }
    
    .button-group {
        gap: 1rem;
    }
    
    .info-panel {
        font-size: 0.85rem;
        padding: 1rem;
    }
    
    .form-container {
        padding: 24px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

.cpm-btn:focus-visible {
    outline: 3px solid #4e8aff;
    outline-offset: 3px;
}