@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(145deg, #121212, #1e2a44);
    padding: 15px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("../img/hero-bg.jpg") no-repeat center center/cover;
    opacity: 0.1;
    z-index: -1;
}

.container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    flex-wrap: wrap;
}

.section {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

h2 {
    font-size: 1.5rem;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: 0.2px;
}

.setup-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-field {
    position: relative;
    margin: 10px 0;
}

.input-field input {
    width: 100%;
    height: 46px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0 12px;
    font-size: 14px;
    color: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-field input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.3);
}

.input-field label {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 400;
    pointer-events: none;
    transition: all 0.2s ease;
}

.input-field input:focus ~ label,
.input-field input:not(:placeholder-shown) ~ label {
    top: -8px;
    left: 8px;
    font-size: 11px;
    color: #3b82f6;
    background: rgba(255, 255, 255, 0.05);
    padding: 0 4px;
    border-radius: 3px;
}

.input-field input:disabled ~ label {
    display: none;
}

#usernameFeedback, #emailStatus, #photoFeedback, .badges-info {
    font-size: 12px;
    text-align: center;
    margin: 8px 0;
    color: #e5e7eb;
    font-weight: 400;
}

.badges-info {
    color: #facc15;
    font-weight: 500;
}

#emailAddress {
    font-size: 14px;
    color: #d1d5db;
    text-align: center;
    margin-bottom: 10px;
    word-break: break-all;
}

#usernameFeedback[style*="color: green"] {
    color: #22c55e;
}

#usernameFeedback[style*="color: red"] {
    color: #ef4444;
}

#emailStatus.verified {
    color: #22c55e;
    font-weight: 500;
}

#emailStatus.not-verified {
    color: #ef4444;
    font-weight: 500;
}

button {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    color: #ffffff;
    font-weight: 500;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 3px 12px rgba(59, 130, 246, 0.2);
}

button:hover:not(:disabled) {
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
    box-shadow: 0 5px 16px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

button:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    box-shadow: none;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.logout-btn {
    background: linear-gradient(90deg, #ef4444, #f87171);
    box-shadow: 0 3px 12px rgba(239, 68, 68, 0.2);
}

.logout-btn:hover:not(:disabled) {
    background: linear-gradient(90deg, #f87171, #ef4444);
    box-shadow: 0 5px 16px rgba(239, 68, 68, 0.3);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    max-width: 360px;
    width: 90%;
    color: #ffffff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    animation: slideIn 0.3s ease-in-out;
}

.modal-content.success {
    border-color: #22c55e;
}

.modal-content.error {
    border-color: #ef4444;
}

.modal-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.modal-content p {
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.modal-content button {
    padding: 8px 16px;
    background: #3b82f6;
    border-radius: 6px;
}

.modal-content button:hover:not(:disabled) {
    background: #60a5fa;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.photo-section {
    margin: 12px 0;
    text-align: center;
}

.photo-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Özel Dosya Seç Butonu */
.file-upload-wrapper {
    position: relative;
    display: inline-block;
}

#profilePhoto {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    position: absolute;
    z-index: -1;
}

#profilePhoto + label {
    display: inline-block;
    background: linear-gradient(90deg, #6b7280, #9ca3af);
    color: #ffffff;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 3px 12px rgba(107, 114, 128, 0.2);
}

#profilePhoto + label:hover {
    background: linear-gradient(90deg, #9ca3af, #6b7280);
    box-shadow: 0 5px 16px rgba(107, 114, 128, 0.3);
    transform: translateY(-1px);
}

#profilePhoto:focus + label,
#profilePhoto:active + label {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

#profilePhotoPreview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
    overflow: hidden;
    display: block;
    margin: 0 auto;
}

#profilePhotoPreview[src=""], #profilePhotoPreview[src="https://res.cloudinary.com/default-photo.jpg"] {
    display: none;
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding: 10px;
    }

    .section {
        max-width: 90%;
        padding: 15px;
    }

    h2 {
        font-size: 1.4rem;
    }

    .input-field input {
        height: 42px;
        font-size: 13px;
    }

    .input-field label {
        font-size: 12px;
    }

    .input-field input:focus ~ label,
    .input-field input:not(:placeholder-shown) ~ label {
        font-size: 10px;
        top: -7px;
    }

    button {
        padding: 8px 14px;
        font-size: 13px;
    }

    .button-group {
        gap: 8px;
    }

    #profilePhotoPreview {
        width: 90px;
        height: 90px;
    }

    .modal-content {
        max-width: 90%;
        padding: 15px;
    }

    .modal-content h3 {
        font-size: 1.2rem;
    }

    .modal-content p {
        font-size: 0.85rem;
    }

    #profilePhoto + label {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 12px;
    }

    h2 {
        font-size: 1.3rem;
    }

    .input-field input {
        height: 40px;
        font-size: 12px;
    }

    button {
        padding: 7px 12px;
        font-size: 12px;
    }

    .photo-upload {
        flex-direction: column;
        gap: 8px;
    }

    #profilePhotoPreview {
        width: 80px;
        height: 80px;
    }

    #profilePhoto + label {
        padding: 7px 14px;
        font-size: 12px;
    }
}