/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #121757;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* Glowing Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(138, 43, 226, 0.3), transparent 50%),
                radial-gradient(circle at 40% 20%, rgba(0, 150, 255, 0.2), transparent 50%);
    animation: bgShift 15s ease-in-out infinite;
    z-index: -1;
}

@keyframes bgShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Beautiful Loading Screen with Glowing Effects */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: white;
    font-size: 18px;
}

.loading-screen::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.4), transparent 70%);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.5); opacity: 0.8; }
}

/* Beautiful AI Loading Animation with Glow */
.ai-loading {
    position: relative;
    width: 150px;
    height: 150px;
    z-index: 10;
}

.ai-loading-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid rgba(138, 43, 226, 0.1);
    border-top: 4px solid #8a2be2;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.5),
                inset 0 0 20px rgba(138, 43, 226, 0.2);
}

.ai-loading-circle:nth-child(2) {
    animation-delay: 0.2s;
    border-top-color: #00d4ff;
    width: 90%;
    height: 90%;
    top: 5%;
    left: 5%;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5),
                inset 0 0 15px rgba(0, 212, 255, 0.2);
}

.ai-loading-circle:nth-child(3) {
    animation-delay: 0.4s;
    border-top-color: #ff10f0;
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    box-shadow: 0 0 10px rgba(255, 16, 240, 0.5),
                inset 0 0 10px rgba(255, 16, 240, 0.2);
}

.ai-loading-text {
    margin-top: 30px;
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-align: center;
    animation: pulse-glow-text 2s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(138, 43, 226, 0.8),
                 0 0 20px rgba(138, 43, 226, 0.6),
                 0 0 30px rgba(138, 43, 226, 0.4);
    z-index: 10;
}

.ai-loading-subtext {
    margin-top: 12px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    text-shadow: 0 0 5px rgba(0, 212, 255, 0.6);
    z-index: 10;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse-glow-text {
    0%, 100% { 
        opacity: 1;
        text-shadow: 0 0 10px rgba(138, 43, 226, 0.8),
                     0 0 20px rgba(138, 43, 226, 0.6),
                     0 0 30px rgba(138, 43, 226, 0.4);
    }
    50% { 
        opacity: 0.8;
        text-shadow: 0 0 20px rgba(138, 43, 226, 1),
                     0 0 30px rgba(138, 43, 226, 0.8),
                     0 0 40px rgba(138, 43, 226, 0.6);
    }
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: rgba(255, 107, 107, 0.3);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: rgba(78, 205, 196, 0.3);
    bottom: 20%;
    right: 10%;
    animation-delay: 5s;
}

.shape-3 {
    width: 350px;
    height: 350px;
    background: rgba(255, 195, 113, 0.3);
    top: 50%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(50px, -50px) rotate(120deg); }
    66% { transform: translate(-50px, 50px) rotate(240deg); }
}

/* Container */
.container {
    position: relative;
    z-index: 1;
    padding: 20px;
    width: 100%;
    max-width: 450px;
}

/* Auth Box */
.auth-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo */
.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo-icon {
    font-size: 60px;
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.logo h1 {
    font-size: 24px;
    color: #333;
    font-weight: 700;
}

/* Headings */
h2 {
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #e6e7ed;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(230, 231, 237, 0.2);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s;
    background: rgba(230, 231, 237, 0.05);
    color: #e6e7ed;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(230, 231, 237, 0.5);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.3);
    background: rgba(230, 231, 237, 0.1);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #8a2be2 0%, #00d4ff 100%);
    color: white;
    width: 100%;
    padding: 16px;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4),
                0 0 20px rgba(138, 43, 226, 0.3);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(138, 43, 226, 0.6),
                0 0 30px rgba(138, 43, 226, 0.5),
                0 0 40px rgba(0, 212, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

/* Messages */
.info-message {
    background: #e3f2fd;
    border: 2px solid #90caf9;
    color: #1976d2;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.error-message {
    background: #fee;
    border: 2px solid #fcc;
    color: #c33;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.status-message {
    padding: 12px;
    border-radius: 10px;
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    display: none;
}

.status-loading {
    background: #e3f2fd;
    border: 2px solid #90caf9;
    color: #1976d2;
}

.status-success {
    background: #e8f5e9;
    border: 2px solid #81c784;
    color: #388e3c;
}

.status-error {
    background: #ffebee;
    border: 2px solid #ef5350;
    color: #c62828;
}

/* Auth Footer */
.auth-footer {
    margin-top: 25px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.auth-footer a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Dashboard Styles */
.dashboard-body {
    background: #121757;
    display: block;
    align-items: flex-start;
}

.navbar {
    background: transparent;
    padding: 40px 0 20px 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 28px;
    font-weight: 700;
    color: #e6e7ed;
}

.nav-brand .logo-icon {
    font-size: 28px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-btn {
    background: rgba(230, 231, 237, 0.1);
    color: #e6e7ed;
    border: 1px solid rgba(230, 231, 237, 0.2);
    padding: 10px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: rgba(230, 231, 237, 0.15);
    color: #e6e7ed;
    border-color: rgba(102, 126, 234, 0.5);
}

.nav-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #e6e7ed;
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
}

.user-welcome {
    color: #666;
    font-size: 14px;
}

/* Dashboard Container */
.dashboard-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Card */
.card {
    background: #01020f;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(230, 231, 237, 0.1);
}

.card h2, .card h3 {
    margin-bottom: 10px;
    color: #e6e7ed;
}

.card-subtitle {
    color: #e6e7ed;
    opacity: 0.8;
    margin-bottom: 25px;
}

/* Image Container */
.image-container {
    min-height: 400px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    overflow: hidden;
    border: 1px solid rgba(230, 231, 237, 0.1);
}

.placeholder {
    text-align: center;
    color: rgba(230, 231, 237, 0.5);
}

.placeholder-icon {
    font-size: 80px;
    margin-bottom: 15px;
    opacity: 0.7;
}

.generated-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-large {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

/* Examples */
.examples-section {
    margin-top: 30px;
    padding: 25px;
    background: rgba(230, 231, 237, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(230, 231, 237, 0.1);
}

.examples-section h3 {
    color: #e6e7ed;
    font-size: 18px;
    margin-bottom: 15px;
}

.example-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #e6e7ed;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
}

.chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Model Info */
.model-info {
    margin-top: 15px;
    text-align: center;
    color: #e6e7ed;
    font-size: 13px;
    background: rgba(230, 231, 237, 0.03);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(230, 231, 237, 0.1);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-action {
    flex: 1;
    min-width: 150px;
    padding: 12px 20px;
    font-size: 14px;
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(17, 153, 142, 0.6);
}

/* Image Gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-btn {
    background: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.2s;
}

.gallery-btn:hover {
    transform: scale(1.1);
}

.btn-download {
    width: 100%;
    margin-top: 15px;
}

/* Responsive */
@media (max-width: 968px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .container {
        padding: 10px;
    }
    
    .auth-box {
        padding: 30px 25px;
    }
}

@media (max-width: 480px) {
    .auth-box {
        padding: 25px 20px;
    }
    
    h2 {
        font-size: 24px;
    }
    
    .card {
        padding: 20px;
    }
}

/* About Section Styles */
.section-content {
    width: 100%;
}

.about-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.about-card {
    background: #01020f;
    border-radius: 25px;
    padding: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(230, 231, 237, 0.1);
}

.profile-section {
    text-align: center;
    margin-bottom: 40px;
}

.profile-image {
    width: 200px;
    height: 200px;
    margin: 0 auto 25px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.4);
    position: relative;
}

.profile-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    box-shadow: inset 0 0 20px rgba(102, 126, 234, 0.3);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-section h2 {
    color: #e6e7ed;
    font-size: 36px;
    margin-bottom: 10px;
}

.profile-subtitle {
    color: #e6e7ed;
    opacity: 0.8;
    font-size: 18px;
}

.about-content {
    color: #e6e7ed;
}

.about-content h3 {
    color: rgba(102, 126, 234, 1);
    font-size: 24px;
    margin-bottom: 15px;
    margin-top: 30px;
}

.about-content h3:first-child {
    margin-top: 0;
}

.about-text {
    color: #e6e7ed;
    opacity: 0.9;
    line-height: 1.8;
    font-size: 16px;
    text-align: justify;
}

.skills-section {
    margin-top: 35px;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.skill-tag {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
    color: #e6e7ed;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(102, 126, 234, 0.5);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.contact-section {
    margin-top: 35px;
}

.contact-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.4));
    color: #e6e7ed;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    border: 1px solid rgba(102, 126, 234, 0.6);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.6), rgba(118, 75, 162, 0.6));
}

.contact-btn span {
    font-size: 18px;
}

@media (max-width: 768px) {
    .about-card {
        padding: 30px 25px;
    }
    
    .profile-image {
        width: 150px;
        height: 150px;
    }
    
    .profile-section h2 {
        font-size: 28px;
    }
    
    .about-content h3 {
        font-size: 20px;
    }
}

