/* Modal Styles - Standard Design */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #1a1a2e;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 0;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    position: relative;
    animation: popupSlideIn 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #30b44c;
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(48, 180, 76, 0.2);
    transform: translateY(-1px);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-sizing: border-box;
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: #30b44c;
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(48, 180, 76, 0.2);
    transform: translateY(-1px);
}

.form-group select option {
    background-color: #1a1a2e;
    color: #ffffff;
    padding: 10px 15px;
}

.form-group select option:hover {
    background-color: #30b44c;
}

/* Button Styles */
.btn-primary {
    width: 100%;
    padding: 14px 30px;
    background: linear-gradient(135deg, #30b44c, #28a745);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(48, 180, 76, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #28a745, #218838);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(48, 180, 76, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Form Container */
#loginForm,
#registerForm {
    padding: 30px;
}

/* Şifremi Unuttum Link */
#loginForm a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 8px 12px;
    border-radius: 6px;
}

#loginForm a:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    transform: translateY(-1px);
}

/* User Info Styles */
.user-info {
    display: flex;
    align-items: center;
    background: #1f2433;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(48, 180, 76, 0.3);
    box-shadow: 0 4px 20px rgba(48, 180, 76, 0.15);
    min-width: 70px;
    position: relative;
    overflow: hidden;
    height: auto;
    box-sizing: border-box;
    margin-right: 0;
}

.user-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(48, 180, 76, 0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.balance {
    color: #ffffff;
    font-weight: 800;
    font-size: 12px;
    text-align: center;
    text-shadow: 0 0 15px rgba(48, 180, 76, 0.5);
    position: relative;
    z-index: 1;
    letter-spacing: 0.3px;
}

.btn-signout {
    display: flex;
    align-items: center;
    background: #1f2433;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(220, 53, 69, 0.3);
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.15);
    min-width: 70px;
    position: relative;
    overflow: hidden;
    height: auto;
    box-sizing: border-box;
    color: #ff6b6b;
    font-weight: 800;
    font-size: 12px;
    text-align: center;
    text-shadow: 0 0 15px rgba(220, 53, 69, 0.5);
    position: relative;
    z-index: 1;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

/* Mobilde çıkış yap butonunu gizle */
@media (max-width: 768px) {
    .btn-signout {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .btn-signout {
        display: none !important;
    }
}

.btn-signout::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(220, 53, 69, 0.1), transparent);
    animation: shimmer 2s infinite;
}

.btn-signout:hover {
    background: rgba(220, 53, 69, 0.25);
    border-color: rgba(220, 53, 69, 0.5);
    color: #ff8a8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

/* Error/Success Messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(48, 180, 76, 0.1);
    border: 1px solid #30b44c;
    color: #30b44c;
}

.alert-error {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    color: #dc3545;
}

/* Animasyonlar */
@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes popupSlideOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        padding: 0;
        max-width: 350px;
    }
    
    .modal-header {
        padding: 20px 25px;
    }
    
    .modal-header h3 {
        font-size: 18px;
    }
    
    #loginForm,
    #registerForm {
        padding: 25px;
    }
    
    .form-group input,
    .form-group select {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .btn-primary {
        padding: 12px 25px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        max-width: 320px;
        margin: 20px;
    }
    
    .modal-header {
        padding: 18px 20px;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
    
    #loginForm,
    #registerForm {
        padding: 20px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px 14px;
        font-size: 12px;
    }
    
    .btn-primary {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .user-info {
        margin-right: 10px;
        min-width: 65px;
        padding: 5px 10px;
    }
    
    .balance {
        font-size: 11px;
    }
    
    .btn-signout {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    /* Mobilde kullanıcı dropdown menüsünü düzelt */
    .user-dropdown {
        position: fixed;
        top: 60px;
        left: 8px;
        right: 8px;
        width: auto;
        max-width: none;
        border-radius: 8px;
        z-index: 1001;
        padding: 6px;
    }
    
    .dropdown-menu {
        max-height: 75vh;
        overflow-y: auto;
        padding: 0;
    }
    
    .dropdown-item {
        padding: 8px 12px;
        font-size: 13px;
        margin-bottom: 1px;
        border-radius: 5px;
    }
    
    .dropdown-item:last-child {
        margin-bottom: 0;
    }
    
    .logout-item {
        background: rgba(220, 53, 69, 0.1);
        border-top: 1px solid rgba(220, 53, 69, 0.2);
        color: #ff6b6b;
        font-weight: 600;
        margin-top: 3px;
    }
}

@media (max-width: 375px) {
    /* Çok küçük ekranlar için dropdown menüyü daha da minimalize et */
    .user-dropdown {
        position: fixed;
        top: 60px;
        left: 5px;
        right: 5px;
        width: auto;
        max-width: none;
        border-radius: 6px;
        z-index: 1001;
        padding: 4px;
    }
    
    .dropdown-menu {
        max-height: 80vh;
        overflow-y: auto;
        padding: 0;
    }
    
    .dropdown-item {
        padding: 6px 10px;
        font-size: 12px;
        margin-bottom: 1px;
        border-radius: 4px;
    }
    
    .dropdown-item:last-child {
        margin-bottom: 0;
    }
    
    .logout-item {
        background: rgba(220, 53, 69, 0.1);
        border-top: 1px solid rgba(220, 53, 69, 0.2);
        color: #ff6b6b;
        font-weight: 600;
        margin-top: 2px;
    }
}
