:root {
    --bg-color: #f5f5f7;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --accent-color: #0071e3;
    --card-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.4;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Typography */
h1, h2, h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 56px;
    line-height: 1.07;
    margin-bottom: 12px;
}

h2 {
    font-size: 40px;
    line-height: 1.1;
    margin-bottom: 20px;
}

p {
    font-size: 19px;
    color: var(--text-secondary);
    line-height: 1.5;
}

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

/* Header */
header {
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    height: 48px;
    display: flex;
    align-items: center;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.brand {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-links a {
    font-size: 12px;
    color: var(--text-primary);
    text-decoration: none;
    margin-left: 24px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.nav-links a:hover {
    opacity: 1;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 120px 0 80px;
    background: #fff;
    margin-bottom: 20px;
}

.hero h1 {
    color: #1d1d1f;
}

.hero p {
    max-width: 600px;
    margin: 0 auto 40px;
    font-weight: 400;
}

/* Buttons */
.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 980px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0,0,0.5,1);
}

.btn-primary {
    background: #0071e3;
    color: #fff;
}

.btn-primary:hover {
    background: #0077ed;
    transform: scale(1.02);
}

.btn-secondary {
    background: transparent;
    color: #0071e3;
    border: 1px solid #0071e3;
}

.btn-secondary:hover {
    background: #0071e3;
    color: #fff;
}

/* Project Cards */
.projects {
    padding: 80px 0;
    background: #f5f5f7;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 2px 4px 12px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.project-image {
    width: 100%;
    height: 240px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
}

.project-content {
    padding: 32px;
}

.project-content h3 {
    font-size: 28px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.project-content p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.project-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.project-tag {
    background: #f5f5f7;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Footer */
footer {
    background: #f5f5f7;
    padding: 40px 0;
    border-top: 1px solid #d2d2d7;
    font-size: 12px;
    color: #86868b;
    text-align: center;
}

footer a {
    color: #515154;
    text-decoration: none;
    margin: 0 10px;
}

footer a:hover {
    text-decoration: underline;
}

/* YouTube Mix Now Specific Styles */
.features {
    padding: 80px 0;
    background: #f5f5f7;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 280px;
    gap: 24px;
}

.feature-card {
    background: #fff;
    border-radius: 24px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 2px 4px 12px rgba(0,0,0,0.08);
}

.feature-card:hover {
    transform: scale(1.01);
    box-shadow: 4px 8px 20px rgba(0,0,0,0.12);
}

.feature-card.large {
    grid-column: span 2;
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 8px;
    background: #f5f5f7;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-content h3 {
    font-size: 24px;
    margin-bottom: 12px;
}

.feature-content p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Screenshots */
.screenshots {
    background: #fff;
    padding: 80px 0;
}

.screenshot-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
}

.screenshot-container > h3 {
    text-align: center;
    font-size: 28px;
    margin-bottom: -20px;
    margin-top: 20px;
}

.screenshot-container > .screenshot-item {
    width: 100%;
}

.screenshot-item {
    background: #f5f5f7;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.screenshot-item img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.screenshot-caption {
    margin-top: 16px;
    font-size: 14px;
    text-align: left;
    font-weight: 500;
    list-style: disc;
    padding-left: 20px;
    display: inline-block;
}

.screenshot-caption li {
    margin-bottom: 6px;
    text-align: left;
}

/* Installation Section */
.installation {
    background: #1d1d1f;
    color: #f5f5f7;
    padding: 100px 0;
}

.installation h2 {
    color: #f5f5f7;
    text-align: center;
}

.installation-content {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 60px;
    border: 1px solid rgba(255,255,255,0.1);
}

.installation-intro {
    text-align: center;
    color: #a1a1a6;
    margin-bottom: 40px;
}

.download-box {
    text-align: center;
    margin-bottom: 60px;
}

.download-box .btn {
    font-size: 17px;
    padding: 16px 32px;
}

.step-list {
    list-style: none;
    counter-reset: step;
}

.step-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 30px;
}

.step-item::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background: #2d2d2f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #fff;
    font-size: 16px;
}

.step-title {
    color: #fff;
    font-weight: 600;
    font-size: 17px;
    margin-bottom: 6px;
    display: block;
}

.step-desc {
    color: #a1a1a6;
    font-size: 15px;
}

.step-desc code {
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: "SF Mono", monospace;
    font-size: 13px;
}

.warning-note {
    background: rgba(255,149,0,0.1);
    border: 1px solid rgba(255,149,0,0.2);
    border-radius: 12px;
    padding: 20px;
    margin-top: 40px;
    display: flex;
    gap: 16px;
    align-items: start;
}

.warning-icon {
    font-size: 20px;
}

.warning-text {
    font-size: 13px;
    color: #ff9f0a;
    line-height: 1.5;
}

/* Privacy Page Styles */
.privacy-content {
    padding: 80px 0;
    max-width: 800px;
    margin: 0 auto;
}

.privacy-content h2 {
    font-size: 32px;
    margin-top: 60px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.privacy-content h3 {
    font-size: 24px;
    margin-top: 40px;
    margin-bottom: 16px;
}

.privacy-content ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 24px;
    color: var(--text-secondary);
}

.privacy-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.privacy-content strong {
    color: var(--text-primary);
}

.back-link {
    margin-top: 60px;
    text-align: center;
}

/* Numora Specific Styles */
.numora-hero {
    text-align: center;
    padding: 100px 0 60px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.numora-hero h1 {
    color: white;
    font-size: 56px;
    margin-bottom: 16px;
}

.numora-hero p {
    color: rgba(255,255,255,0.95);
    font-size: 21px;
    max-width: 600px;
    margin: 0 auto;
}

.numora-app {
    padding: 60px 0 80px;
    background: #f5f5f7;
}

.numora-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 1000px;
    margin: 0 auto;
    gap: 30px;
    padding: 0 20px;
}

.numora-container {
    flex: 1;
}

.calculator-card {
    background: white;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 2px 4px 12px rgba(0,0,0,0.08);
}

.calculator-card h2 {
    font-size: 28px;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.history-panel {
    background: white;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 2px 4px 12px rgba(0,0,0,0.08);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.history-header h2 {
    font-size: 24px;
    margin: 0;
}

.numora-container input[type="text"] {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    margin-bottom: 15px;
}

.numora-container input[type="text"]:focus {
    outline: none;
    border-color: #0071e3;
}

.numora-container button[type="submit"] {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 980px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0,0,0.5,1);
    font-weight: 600;
}

.numora-container button[type="submit"]:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(240, 147, 251, 0.3);
}

.clear-btn {
    width: auto;
    padding: 8px 16px;
    font-size: 0.85rem;
    background: transparent;
    color: #dc3545;
    border: 1px solid #dc3545;
    border-radius: 980px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.clear-btn:hover {
    background: #dc3545;
    color: white;
}

.result {
    margin-top: 32px;
    padding: 32px;
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.1) 0%, rgba(245, 87, 108, 0.1) 100%);
    border-radius: 20px;
    text-align: center;
    display: none;
    border: 2px solid rgba(240, 147, 251, 0.2);
}

.result.show {
    display: block;
    animation: fadeInUp 0.5s ease-out;
}

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

.result-label {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 600;
}

.result-value {
    font-size: 72px;
    font-weight: 700;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 16px;
}

.steps {
    margin-top: 16px;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.8;
}

.history-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.history-item:hover {
    background: #f8f9fa;
}

.history-item:last-child {
    border-bottom: none;
}

.history-input {
    font-weight: bold;
    color: #333;
}

.history-result {
    color: #0071e3;
    font-size: 1.2rem;
    font-weight: bold;
}

.history-time {
    font-size: 0.75rem;
    color: #999;
}

.empty-history {
    color: #999;
    text-align: center;
    padding: 20px;
}

.history-steps {
    font-size: 0.8rem;
    color: #666;
    word-break: break-word;
}

.history-label {
    font-size: 0.85rem;
    color: #28a745;
    font-weight: 600;
    margin-bottom: 2px;
}

.delete-btn {
    width: auto;
    padding: 2px 8px;
    font-size: 0.7rem;
    background: #6c757d;
    float: right;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.delete-btn:hover {
    background: #5a6268;
}

.auth-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.google-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid #ddd;
    color: #333;
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    width: auto;
}

.google-btn:hover {
    background: #f8f9fa;
}

.google-btn img {
    width: 18px;
    height: 18px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.user-email {
    font-size: 0.85rem;
    color: #666;
}

.logout-btn {
    width: auto;
    padding: 6px 12px;
    font-size: 0.8rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.sync-status {
    font-size: 0.75rem;
    color: #28a745;
}

/* Responsive */
@media (min-width: 768px) {
    .numora-wrapper {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .numora-container {
        flex: 1;
    }
    
    .history-panel {
        width: 300px;
        order: 1;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 40px; }
    h2 { font-size: 32px; }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    
    .feature-card.large {
        grid-column: span 1;
    }
    
    .cta-buttons {
        flex-direction: column;
        padding: 0 40px;
    }

    .installation-content {
        padding: 30px;
    }
}
