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

:root {
    --primary: #e94560;
    --secondary: #ff6b6b;
    --accent: #feca57;
    --success: #64ffda;
    --warning: #ff9f43;
    --danger: #ee5a24;
    --bg-dark: #0a0a0f;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --text-primary: #ffffff;
    --text-secondary: #8892b0;
    --text-muted: #5a6785;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: rgba(0, 0, 0, 0.3);
    --glow: rgba(233, 69, 96, 0.4);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0f;
    min-height: 100vh;
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.logo-icon {
    width: 64px;
    height: 64px;
    animation: logoFloat 4s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.logo-icon polyline {
    animation: pulseDraw 2s ease-in-out infinite;
}

@keyframes pulseDraw {
    0%, 100% { stroke-dashoffset: 0; }
    50% { stroke-dashoffset: 10; }
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-name {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.logo-tagline {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.5px;
}

header {
    text-align: center;
    padding: 40px 20px 30px;
}

header h1 {
    display: none;
}

.subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.5px;
    max-width: 500px;
    margin: 0 auto;
}

.upload-section {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    perspective: 1000px;
}

.drop-zone {
    width: 100%;
    max-width: 550px;
    height: 280px;
    border: 2px dashed rgba(233, 69, 96, 0.4);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.drop-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.05), rgba(100, 255, 218, 0.02));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    transform: translateY(-5px) scale(1.01);
    box-shadow:
        0 25px 50px -12px var(--shadow),
        0 0 0 1px rgba(233, 69, 96, 0.1),
        inset 0 0 60px rgba(233, 69, 96, 0.05);
}

.drop-zone:hover::before,
.drop-zone.dragover::before {
    opacity: 1;
}

.drop-zone.dragover {
    border-style: solid;
    border-color: var(--success);
}

.upload-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.15), rgba(233, 69, 96, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.drop-zone:hover .upload-icon-wrapper {
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.25), rgba(233, 69, 96, 0.1));
    transform: scale(1.1);
}

.upload-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.drop-zone p {
    color: var(--text-secondary);
    margin: 6px 0;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

.drop-zone .divider {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 8px 0;
}

.upload-btn {
    margin-top: 16px;
    padding: 14px 36px;
    font-size: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 600;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.upload-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.upload-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(233, 69, 96, 0.35);
}

.upload-btn:hover::before {
    opacity: 1;
}

.preview-section {
    margin: 40px 0;
    opacity: 0;
    transform: translateY(20px);
    animation: slideIn 0.5s ease forwards;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.preview-hint {
    text-align: center;
    color: var(--text-muted);
    margin-top: 20px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.preview-hint::before,
.preview-hint::after {
    content: '';
    width: 30px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--text-muted));
}

.preview-hint::after {
    background: linear-gradient(90deg, var(--text-muted), transparent);
}

.image-container {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.image-container::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

#previewImage {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

.image-container:hover #previewImage {
    transform: scale(1.02);
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.clean-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: cleanSpin 0.6s linear infinite;
}

@keyframes cleanSpin {
    to { transform: rotate(360deg); }
}

.results-section {
    margin: 50px 0;
    animation: fadeInUp 0.6s ease;
}

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

.rating-container {
    text-align: center;
    margin-bottom: 50px;
}

.score-wrapper {
    position: relative;
    display: inline-block;
}

.score-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: transparent;
    border: 3px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    position: relative;
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 165px;
    height: 165px;
    border-radius: 50%;
    background: linear-gradient(145deg, #12121a, #0a0a0f);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

#scoreValue {
    font-size: 4rem;
    font-weight: 800;
    position: relative;
    z-index: 1;
    line-height: 1;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

.rating-badges {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.badge {
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 40px 0;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.metric-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    border-color: rgba(233, 69, 96, 0.2);
}

.metric-card:hover::before {
    opacity: 1;
}

.metric-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
}

.metric-card h3 {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.metric-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

.metric-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.02));
}

.metric-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0;
}

.metric-score {
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.advice-section,
.social-tips {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    margin: 30px 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.section-header h2 {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
}

.advice-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.advice-content h3 {
    color: var(--text-primary);
    margin: 28px 0 14px;
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.advice-content h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
}

.advice-content ul {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.advice-content li {
    padding: 14px 18px;
    padding-left: 48px;
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.advice-content li:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(4px);
}

.advice-content li::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.advice-content li:nth-child(odd)::before {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.tip-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    transition: all 0.3s ease;
}

.tip-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(233, 69, 96, 0.2);
    transform: translateY(-2px);
}

.tip-card h4 {
    color: var(--text-primary);
    margin-bottom: 14px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tip-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.comments-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    margin: 30px 0;
}

.comments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.comment-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.comment-card::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 14px;
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.comment-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(233, 69, 96, 0.2);
    transform: translateY(-2px);
}

.comment-card {
    animation: commentSlideIn 0.5s ease forwards;
    opacity: 0;
}

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

.comment-avatar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}

.avatar-1 { background: linear-gradient(135deg, #e94560, #ff6b6b); }
.avatar-2 { background: linear-gradient(135deg, #64ffda, #00bfa5); }
.avatar-3 { background: linear-gradient(135deg, #feca57, #ff9f43); }
.avatar-4 { background: linear-gradient(135deg, #a55eea, #8854d0); }
.avatar-5 { background: linear-gradient(135deg, #20bf6b, #0fb9b1); }
.avatar-6 { background: linear-gradient(135deg, #eb3b5a, #fa8231); }
.avatar-7 { background: linear-gradient(135deg, #2d98da, #3867d6); }
.avatar-8 { background: linear-gradient(135deg, #f7b731, #e1b12c); }

.user-info {
    display: flex;
    flex-direction: column;
}

.username {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.verified {
    color: #1da1f2;
    font-size: 0.9rem;
}

.handle {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.comment-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    padding-left: 52px;
    font-style: italic;
}

.comment-engagement {
    display: flex;
    gap: 16px;
    margin-top: 14px;
    padding-left: 52px;
}

.engagement-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.engagement-item:hover {
    color: var(--primary);
}

.engagement-item.liked {
    color: var(--primary);
}

.engagement-item.liked .heart {
    animation: heartPop 0.3s ease;
}

@keyframes heartPop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.analyze-btn {
    display: block;
    width: 100%;
    max-width: 360px;
    margin: 50px auto;
    padding: 18px 48px;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 600;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.analyze-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.analyze-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.analyze-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 40px rgba(233, 69, 96, 0.35);
}

.analyze-btn:hover::before {
    opacity: 1;
}

.analyze-btn:active {
    transform: translateY(-2px) scale(1.01);
}

.analyze-btn span {
    position: relative;
    z-index: 1;
}

footer {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

footer span {
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    .logo-icon {
        width: 52px;
        height: 52px;
    }

    .logo-name {
        font-size: 1.6rem;
    }

    .logo-tagline {
        font-size: 0.85rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .drop-zone {
        height: 240px;
        margin: 0 16px;
    }

    .score-circle {
        width: 170px;
        height: 170px;
    }

    .score-circle::before {
        width: 140px;
        height: 140px;
    }

    #scoreValue {
        font-size: 3rem;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .advice-section,
    .social-tips,
    .comments-section {
        padding: 24px;
    }

    .comments-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo {
        flex-direction: column;
        gap: 12px;
    }

    .logo-icon {
        width: 64px;
        height: 64px;
    }

    .logo-text {
        align-items: center;
    }

    .logo-name {
        font-size: 1.8rem;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .comments-grid {
        grid-template-columns: 1fr;
    }
}
