/* Google-style Cringe Detector */

:root {
    /* Default/Neutral Colors (0-20% cringe) */
    --bg-color: #fff;
    --text-color: #222;
    --accent-color: #4285f4;
    --border-color: #ddd;
    --search-bg: #fff;
    --result-bg: #f8f9fa;
    --shadow-color: rgba(0, 0, 0, 0.1);
    
    /* Low Cringe Colors (21-40%) */
    --low-bg: #f0f8ff;
    --low-text: #1a365d;
    --low-accent: #3182ce;
    --low-border: #bee3f8;
    --low-search: #ebf8ff;
    --low-result: #e6fffa;
    --low-shadow: rgba(49, 130, 206, 0.15);
    
    /* Medium Cringe Colors (41-60%) */
    --med-bg: #fffaf0;
    --med-text: #744210;
    --med-accent: #d69e2e;
    --med-border: #fbd38d;
    --med-search: #fefcbf;
    --med-result: #fffff0;
    --med-shadow: rgba(214, 158, 46, 0.2);
    
    /* High Cringe Colors (61-80%) */
    --high-bg: #fff5f5;
    --high-text: #742a2a;
    --high-accent: #e53e3e;
    --high-border: #feb2b2;
    --high-search: #fed7d7;
    --high-result: #fffafa;
    --high-shadow: rgba(229, 62, 62, 0.25);
    
    /* Extreme Cringe Colors (81-100%) */
    --extreme-bg: #2d1b69;
    --extreme-text: #e2e8f0;
    --extreme-accent: #9f7aea;
    --extreme-border: #553c9a;
    --extreme-search: #322659;
    --extreme-result: #1a202c;
    --extreme-shadow: rgba(159, 122, 234, 0.3);
}

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

body {
    font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 140px;
    background-color: var(--bg-color);
    margin: 0;
    letter-spacing: 0.3px;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.google-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    max-width: 1500px;
    margin: 0 auto;
}

/* Logo */
.logo-container {
    margin-bottom: 0; /* Remove unwanted space */
}

.logo-svg-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
    text-align: center;
}

.main-logo-svg {
    height: 120px; /* 15% smaller: 141px * 0.85 = 120px */
    width: auto;
    margin: 0 !important;
    padding: 0 !important;
    display: block;
}

.google-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 64px;
    margin-bottom: 40px;
    text-align: center;
    letter-spacing: 2px;
}

.letter-g-blue {
    color: #4285f4;
}

.letter-o-red {
    color: #ea4335;
}

.letter-o-yellow {
    color: #fbbc05;
}

.letter-l-green {
    color: #34a853;
}

.letter-e-red {
    color: #ea4335;
}

/* Search Container */
.search-container {
    width: 100%;
    max-width: 1400px;
    margin-bottom: 30px;
}

.search-form {
    width: 100%;
    max-width: 700px;
    display: flex;
    justify-content: center;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 700px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.search-icon img {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

/* Search Box */
.search-box {
    width: 100%;
    position: relative;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}



input[type="text"] {
    width: 100%;
    height: 44px;
    padding: 0 20px 0 44px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 24px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
    background: #fff;
    box-sizing: border-box;
    outline: none;
    transition: box-shadow 0.3s ease-in-out;
    color: #333 !important;
    letter-spacing: 0.5px;
    text-overflow: clip;
    overflow: visible;
}

input[type="text"]::placeholder {
    color: #70757a;
    letter-spacing: 0.5px;
    text-indent: 0;
    padding-left: 0;
}



input[type="text"]:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

input[type="text"]:focus {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}





/* Error Message */
.error-message {
    background: #fef7f0;
    border: 1px solid #fdd663;
    border-radius: 8px;
    color: #d93025;
    padding: 12px 16px;
    margin-bottom: 20px;
    max-width: 584px;
    text-align: center;
}

/* Results Container */
.results-container {
    width: 100%;
    max-width: 584px;
    margin-top: 20px;
}

/* Cringe Meter Infographic */
.cringe-meter-infographic {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 32px 24px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: none;
}

.meter-header {
    margin-bottom: 24px;
}

.meter-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, #ff6b9d, #a855f7, #06d6a0, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 6px 0;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 1;
    position: relative;
}

.meter-title::before {
    content: '✨';
    margin-right: 4px;
    font-size: 12px;
}

.meter-title::after {
    content: '✨';
    margin-left: 4px;
    font-size: 12px;
}

.meter-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(45deg, #FF6B9D, #6C5CE7, #00E676);
    border-radius: 2px;
}

.meter-subtitle {
    font-family: 'Satoshi', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    font-style: normal;
    letter-spacing: 0.8px;
    text-transform: lowercase;
    opacity: 0.9;
}

.meter-visual {
    margin: 32px 0;
}

.meter-gauge {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto 24px;
    height: 32px;
}

.gauge-bg {
    position: absolute;
    top: 8px;
    left: 0;
    width: 100%;
    height: 16px;
    background: linear-gradient(to right, 
        #34a853 0%, 
        #34a853 20%, 
        #fbbc04 20%, 
        #fbbc04 40%, 
        #ff9800 40%, 
        #ff9800 60%, 
        #f44336 60%, 
        #f44336 80%, 
        #9c27b0 80%, 
        #9c27b0 100%);
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.gauge-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 32px;
    background: transparent;
    border-radius: 16px;
    transition: width 2s ease-out;
    animation: gaugeGlow 2s ease-out;
}

.gauge-pointer {
    position: absolute;
    top: -4px;
    height: 40px;
    width: 4px;
    background: #1a73e8;
    border-radius: 2px;
    transition: left 2s ease-out;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.4);
    animation: pointerSlide 2s ease-out;
}

.pointer-triangle {
    position: absolute;
    top: -8px;
    left: -6px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 12px solid #1a73e8;
}

.meter-scale {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 8px;
}

.scale-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.scale-emoji {
    font-size: 20px;
    display: block;
}

.scale-label {
    font-size: 10px;
    color: #5f6368;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

.meter-reading {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}



.reading-status {
    margin-top: 0;
}

.status-text {
    font-size: 16px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
}



/* Copyright Footer */
.copyright-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 8px 24px;
    text-align: center;
    border: none;
    background: transparent;
    z-index: 1;
}

.copyright-text {
    font-size: 10px;
    line-height: 1.4;
    color: #9aa0a6;
    max-width: 800px;
    margin: 0 auto;
    font-weight: 400;
    opacity: 0.7;
}

@keyframes gaugeGlow {
    0% { box-shadow: 0 0 0 rgba(26, 115, 232, 0); }
    50% { box-shadow: 0 0 20px rgba(26, 115, 232, 0.3); }
    100% { box-shadow: 0 0 0 rgba(26, 115, 232, 0); }
}

@keyframes pointerSlide {
    0% { 
        left: 0; 
        transform: scale(1.2);
        box-shadow: 0 2px 16px rgba(26, 115, 232, 0.6);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(26, 115, 232, 0.4);
    }
}

/* Result Summary (under search bar) */
.result-summary {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px 24px;
    background: transparent;
    border: none;
    border-radius: 0;
    text-align: center;
    box-shadow: none;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-text {
    font-size: 20px;
    line-height: 1.5;
    color: #000 !important;
    margin: 0 0 28px 0;
    max-width: 100%;
    width: 100%;
    text-align: center;
    padding: 0 20px;
}

/* Social Sharing Buttons */
.share-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 32px;
}

.share-btn {
    padding: 10px 16px;
    border: 1px solid #dadce0;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
}

.tiktok-btn {
    background: white;
    color: #3c4043;
    border: 1px solid #dadce0;
    text-decoration: none;
}

.tiktok-btn:hover {
    background: #f8f9fa;
    border-color: #c4c7c5;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Mobile Responsive Fixes */
@media (max-width: 768px) {
    .search-container {
        padding: 0 20px;
    }
    
    .search-icon {
        left: 36px; /* Adjust for mobile padding */
        width: 16px;
        height: 16px;
    }
    
    .search-icon img {
        width: 16px;
        height: 16px;
    }
    
    input[type="text"] {
        padding: 0 20px 0 60px; /* Increase left padding for icon space */
        font-size: 16px; /* Prevent zoom on iOS */
        height: 48px; /* Slightly larger for mobile touch */
    }
    
    input[type="text"]::placeholder {
        padding-left: 14px; /* Additional space for mobile icon */
        text-indent: 14px;
    }
    
    .result-text {
        font-size: 18px;
        padding: 0 15px;
    }
    
    .meter-gauge {
        max-width: 320px;
    }
}

@media (max-width: 480px) {
    .search-container {
        padding: 0 15px;
    }
    
    .search-icon {
        left: 31px;
        width: 14px;
        height: 14px;
    }
    
    .search-icon img {
        width: 14px;
        height: 14px;
    }
    
    input[type="text"] {
        padding: 0 15px 0 50px;
        height: 44px;
        font-size: 16px;
    }
    
    input[type="text"]::placeholder {
        padding-left: 16px; /* Extra space for smaller mobile screens */
        text-indent: 16px;
    }
    
    .result-text {
        font-size: 16px;
        padding: 0 10px;
    }
}



@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}



/* Cringe Video Section */
.cringe-video-section {
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 24px;
    margin-top: 20px;
    text-align: center;
    animation: slideInUp 0.6s ease-out;
}

.video-header h3 {
    color: #e65100;
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 8px;
    animation: shake 0.5s ease-in-out;
}

.video-header p {
    color: #bf360c;
    font-size: 14px;
    margin-bottom: 20px;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
    border-radius: 8px;
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

@keyframes fillMeter {
    from { width: 0%; }
}

@keyframes fillMeter {
    from {
        width: 0%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding-top: 40px;
    }
    
    .container {
        padding: 20px 16px;
    }
    
    .main-logo-svg {
        width: 260px;
        height: 69px;
        margin: 20px auto;
        max-width: 85vw;
    }
    
    .slogan-text {
        font-size: 15px;
        margin: 16px auto 28px;
        padding: 0 20px;
        line-height: 1.4;
    }
    
    .search-form {
        max-width: 90vw;
        margin: 0 auto;
    }
    
    .search-container {
        max-width: 100%;
        margin: 0 auto;
    }
    
    input[type="text"] {
        width: 100%;
        min-width: 0;
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 13px 50px 13px 18px;
        box-sizing: border-box;
    }
    
    .search-icon {
        right: 15px;
    }
    
    #suggestions {
        left: 0;
        right: 0;
        max-width: none;
        margin: 0;
    }
    
    .result-text {
        font-size: 18px;
        line-height: 1.5;
        padding: 0 15px;
        text-align: center;
        color: #000 !important;
    }
    
    .meter-gauge {
        max-width: 320px;
    }
    
    .meter-title {
        font-size: 20px;
    }
    
    .scale-label {
        font-size: 9px;
    }
    
    .cringe-meter-infographic {
        padding: 24px 16px;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 30px;
    }
    
    .container {
        padding: 16px 12px;
    }
    
    .main-logo-svg {
        width: 220px;
        height: 58px;
        margin: 16px auto;
        max-width: 90vw;
    }
    
    .slogan-text {
        font-size: 14px;
        margin: 12px auto 24px;
        padding: 0 16px;
        line-height: 1.4;
    }
    
    .search-form {
        max-width: 95vw;
        margin: 0 auto;
    }
    
    .search-container {
        max-width: 100%;
    }
    
    input[type="text"] {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 12px 48px 12px 16px;
        box-sizing: border-box;
        /* Enhanced mobile input */
        -webkit-appearance: none;
        -webkit-border-radius: 0;
        border-radius: 24px;
        -webkit-tap-highlight-color: transparent;
    }
    
    .search-icon {
        right: 12px;
        padding: 4px; /* Larger touch area */
        -webkit-tap-highlight-color: transparent;
    }
    
    #suggestions {
        margin: 0;
        max-height: 60vh; /* Limit height on mobile */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 0 0 20px 20px;
    }
    
    .result-text {
        font-size: 16px;
        line-height: 1.5;
        padding: 0 12px;
        text-align: center;
        color: #000 !important;
    }
    
    .meter-gauge {
        max-width: 280px;
    }
    
    .meter-title {
        font-size: 18px;
    }
    
    .meter-subtitle {
        font-size: 12px;
    }
    
    .scale-emoji {
        font-size: 16px;
    }
    
    .scale-label {
        font-size: 8px;
    }
    
    .share-buttons {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
    
    .share-btn {
        font-size: 14px;
        padding: 12px 16px;
        min-height: 44px; /* iOS recommended minimum touch target */
        width: 200px;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
    }
    
    .status-text {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .cringe-meter-infographic {
        padding: 20px 12px;
    }
    
    .result-summary {
        padding: 16px 12px;
        margin: 16px auto;
    }
    
    .copyright-footer {
        padding: 16px 12px;
        font-size: 11px;
    }
}



/* Rotating Slogan */
.slogan-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: #666;
    text-align: center;
    margin: 24px 0 80px 0 !important; /* 24px top, 80px bottom spacing */
    padding: 0 !important;
    line-height: 1;
    font-family: 'Satoshi', sans-serif;
    letter-spacing: 0.3px;
}