* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.form-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.form-box {
    display: none;
    padding: 40px;
    animation: fadeIn 0.5s ease-in-out;
}

.form-box.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-box h2 {
    color: #667eea;
    margin-bottom: 30px;
    text-align: center;
    font-size: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary {
    background: #f0f0f0;
    color: #333;
    margin-top: 10px;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.toggle-text {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

.toggle-text a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.toggle-text a:hover {
    text-decoration: underline;
}

.message {
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.user-info {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.user-info p {
    margin: 10px 0;
    color: #333;
    font-size: 14px;
}

.user-info strong {
    color: #667eea;
}

@media (max-width: 480px) {
    .container {
        max-width: 100%;
    }

    .form-box {
        padding: 30px 20px;
    }

    .form-box h2 {
        font-size: 20px;
    }
}

/* YouTube Input Styles */
.youtube-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #f9f9f9;
}

.youtube-prefix {
    padding: 12px 15px;
    background: #ff0000;
    color: white;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
    border-right: 1px solid #ddd;
}

.youtube-input-wrapper input {
    flex: 1;
    border: none;
    padding: 12px 15px !important;
    background: transparent;
    font-size: 14px;
}

.youtube-input-wrapper input:focus {
    outline: none;
    background: #fafafa;
}

/* Info Icon */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 8px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.info-icon:hover {
    background: #764ba2;
    transform: scale(1.1);
}

/* Info Popup */
.info-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
}

.info-popup.show {
    display: flex;
}

.popup-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.popup-content h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 18px;
}

.popup-content ol {
    margin-left: 20px;
    line-height: 1.8;
    color: #333;
}

.popup-content li {
    margin-bottom: 15px;
    font-size: 14px;
}

.popup-content code {
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    color: #d63384;
}

.popup-content p {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 13px;
}

.close-popup {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.close-popup:hover {
    color: #333;
}

/* ===================== */
/* ANA SAYFA VE PROFİL STİLLERİ */
/* ===================== */

.hidden {
    display: none !important;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
}

.header-left h1 {
    font-size: 24px;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 50px;
}

.user-profile-badge .username {
    font-weight: 600;
    font-size: 14px;
}

.user-profile-badge .credits {
    background: rgba(255, 255, 255, 0.3);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Button Styles */
.btn-small {
    padding: 8px 12px;
    font-size: 12px;
    margin: 0;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-check {
    font-size: 16px;
    padding: 8px;
    border-radius: 6px;
}

.btn-logout {
    background: rgba(255, 76, 76, 0.3);
}

.btn-logout:hover {
    background: rgba(255, 76, 76, 0.5);
}

.btn-back {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    margin-right: 10px;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Main Content */
.main-content {
    padding: 40px 20px;
    min-height: calc(100vh - 70px);
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    margin-bottom: 50px;
}

.welcome-section h2 {
    color: #333;
    font-size: 32px;
    margin-bottom: 15px;
}

.welcome-section p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

/* Home Cards */
.home-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    border-left: 5px solid #667eea;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card h3 {
    color: #333;
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.card p {
    color: #666;
    font-size: 14px;
    margin: 8px 0;
}

.card a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.card a:hover {
    text-decoration: underline;
}

.credit-value {
    font-size: 36px;
    color: #667eea;
    font-weight: 700;
    margin: 15px 0;
}

.small-text {
    color: #999;
    font-size: 12px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Profile Container */
.profile-container-inner {
    max-width: 700px;
    margin: 0 auto;
}

.profile-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.profile-section h2 {
    color: #667eea;
    font-size: 20px;
    margin-bottom: 20px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
}

.info-row label {
    font-weight: 600;
    color: #333;
    margin-right: 10px;
}

.info-row span {
    color: #666;
    font-size: 14px;
}

.info-row a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.info-row a:hover {
    text-decoration: underline;
}

.info-row small {
    color: #999;
    font-size: 12px;
    margin-left: auto;
    margin-top: 5px;
    width: 100%;
}

/* Profile Form */
.profile-section form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-section .form-group {
    margin: 0;
}

.profile-section .form-group label {
    margin-bottom: 8px;
}

.profile-section .form-group input {
    width: 100%;
}

.profile-section .btn {
    margin-top: 0;
}

/* Auth Container for Login/Register */
.auth-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-container .container {
    max-width: 400px;
}

.auth-container .form-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Home Container */
.home-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.home-container .header {
    flex-shrink: 0;
}

.home-container .main-content {
    flex-grow: 1;
}

/* Profile Container */
.profile-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.profile-container .header {
    flex-shrink: 0;
}

.profile-container .main-content {
    flex-grow: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .home-cards {
        grid-template-columns: 1fr;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .header-right {
        width: 100%;
        flex-wrap: wrap;
    }

    .user-profile-badge {
        width: 100%;
        flex-wrap: wrap;
    }

    .welcome-section h2 {
        font-size: 24px;
    }

    .profile-section {
        padding: 20px;
    }

    .info-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .info-row label {
        margin-right: 0;
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 20px 10px;
    }

    .card {
        padding: 20px;
    }

    .profile-section {
        padding: 15px;
    }

    .header-left h1 {
        font-size: 18px;
    }

    .welcome-section h2 {
        font-size: 18px;
    }

    .card h3 {
        font-size: 16px;
    }

    .user-profile-badge {
        gap: 8px;
        padding: 8px 12px;
    }

    .btn-small {
        padding: 6px 8px;
        font-size: 11px;
    }
}
