/* CSS Variables for theming */
:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --accent-color: #007bff;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --toggle-bg: #f8f9fa;
    --toggle-hover: #e9ecef;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #ffffff;
    --accent-color: #4dabf7;
    --border-color: #333333;
    --shadow-color: rgba(255, 255, 255, 0.1);
    --toggle-bg: #2d2d2d;
    --toggle-hover: #404040;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'ProggyClean Nerd Font Mono', 'Courier New', monospace;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

.container {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1000;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    color: var(--text-color);
    opacity: 0.6;
}

.theme-toggle:hover {
    opacity: 1;
    background: var(--toggle-bg);
    transform: scale(1.05);
}

.theme-toggle:active {
    transform: scale(0.98);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    transition: all 0.2s ease;
}

.theme-toggle:hover svg {
    transform: rotate(90deg);
}

/* Main Content */
.main-content {
    text-align: center;
    padding: 20px;
    max-width: 600px;
    width: 100%;
}

/* Brand Title */
.brand-title {
    font-family: 'ProggyClean Nerd Font Mono', 'Courier New', monospace;
    font-size: clamp(3.5rem, 12vw, 8rem);
    font-weight: 400;
    color: var(--text-color);
    margin: 0 0 40px 0;
    letter-spacing: 0.1em;
    text-transform: lowercase;
    opacity: 0.95;
    transition: color 0.3s ease;
    text-shadow: 2px 2px 4px var(--shadow-color);
    line-height: 1;
}

.cat-container {
    margin-bottom: 30px;
}

.cat-image {
    max-width: 300px;
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid var(--border-color);
}

.cat-image:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px var(--shadow-color);
}

.cat-image:active {
    transform: scale(0.98);
}

.coming-soon-text {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-color);
    font-weight: 400;
    letter-spacing: 0.5px;
    opacity: 0.9;
    transition: color 0.3s ease;
}

.animated-dots {
    display: inline-block;
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

.animated-dots::after {
    content: '';
    animation: dots 1.5s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .theme-toggle {
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
    }
    
    .theme-toggle svg {
        width: 18px;
        height: 18px;
    }
    
    .main-content {
        padding: 15px;
        max-width: 100%;
    }
    
    .cat-container {
        margin-bottom: 25px;
    }
    
    .brand-title {
        font-size: clamp(2.5rem, 8vw, 5rem);
        margin-bottom: 30px;
        letter-spacing: 0.05em;
    }
    
    .cat-image {
        max-width: 280px;
        border-radius: 12px;
    }
    
    .coming-soon-text {
        font-size: 16px;
        padding: 0 15px;
        line-height: 1.5;
    }
    
.additional-text {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cat-tongue-gif {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.cat-tongue-gif:hover {
    opacity: 1;
}
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .theme-toggle {
        top: 12px;
        right: 12px;
        width: 34px;
        height: 34px;
    }
    
    .theme-toggle svg {
        width: 16px;
        height: 16px;
    }
    
    .main-content {
        padding: 10px;
    }
    
    .cat-container {
        margin-bottom: 20px;
    }
    
    .brand-title {
        font-size: clamp(2.2rem, 6vw, 3.5rem);
        margin-bottom: 25px;
        letter-spacing: 0.03em;
    }
    
    .cat-image {
        max-width: 240px;
        border-radius: 10px;
        border-width: 2px;
    }
    
    .coming-soon-text {
        font-size: 15px;
        padding: 0 10px;
        line-height: 1.4;
        letter-spacing: 0.3px;
    }
    
    .additional-text {
        font-size: 13px;
        margin-top: 8px;
        gap: 6px;
    }
    
    .cat-tongue-gif {
        width: 26px;
        height: 26px;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 10px;
    }
    
    .theme-toggle {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
    }
    
    .theme-toggle svg {
        width: 14px;
        height: 14px;
    }
    
    .main-content {
        padding: 8px;
    }
    
    .brand-title {
        font-size: clamp(1.8rem, 5vw, 3rem);
        margin-bottom: 20px;
        letter-spacing: 0.02em;
    }
    
    .cat-image {
        max-width: 200px;
        border-radius: 8px;
    }
    
    .coming-soon-text {
        font-size: 14px;
        padding: 0 8px;
        line-height: 1.3;
    }
    
    .additional-text {
        font-size: 12px;
        margin-top: 6px;
        gap: 5px;
    }
    
    .cat-tongue-gif {
        width: 22px;
        height: 22px;
    }
}

/* Landscape phone orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .container {
        padding: 10px;
    }
    
    .main-content {
        padding: 5px;
    }
    
    .cat-container {
        margin-bottom: 15px;
    }
    
    .cat-image {
        max-width: 180px;
    }
    
    .coming-soon-text {
        font-size: 14px;
        line-height: 1.3;
    }
    
    .additional-text {
        font-size: 12px;
        margin-top: 5px;
    }
}

/* Loading animation for cat image */
.cat-image {
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

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

/* Smooth transitions for theme changes */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* CSS Variables for animation timing */
:root {
    --expo-in: linear(
        0 0%, 0.0085 31.26%, 0.0167 40.94%,
        0.0289 48.86%, 0.0471 55.92%,
        0.0717 61.99%, 0.1038 67.32%,
        0.1443 72.07%, 0.1989 76.7%,
        0.2659 80.89%, 0.3465 84.71%,
        0.4419 88.22%, 0.554 91.48%,
        0.6835 94.51%, 0.8316 97.34%, 1 100%
    );
    --expo-out: linear(
        0 0%, 0.1684 2.66%, 0.3165 5.49%,
        0.446 8.52%, 0.5581 11.78%,
        0.6535 15.29%, 0.7341 19.11%,
        0.8011 23.3%, 0.8557 27.93%,
        0.8962 32.68%, 0.9283 38.01%,
        0.9529 44.08%, 0.9711 51.14%,
        0.9833 59.06%, 0.9915 68.74%, 1 100%
    );
}

/* View Transitions API Styles */
@supports (view-transition-name: root) {
    html {
        view-transition-name: root;
    }
    
    .theme-toggle {
        view-transition-name: theme-toggle;
    }
}

/* View Transition Animations - GIF Mask */
::view-transition-group(root) {
    animation-timing-function: var(--expo-in);
}

::view-transition-new(root) {
    mask: url('https://media.tenor.com/adLokhFRSiQAAAAi/kasper-dancing.gif') center / 0 no-repeat;
    animation: scale 3s;
}

::view-transition-old(root),
[data-theme="dark"]::view-transition-old(root) {
    animation: scale 3s;
}

@keyframes scale {
    0% {
        mask-size: 0;
    }
    10% {
        mask-size: 40vmax;
    }
    90% {
        mask-size: 40vmax;
    }
    100% {
        mask-size: 1500vmax;
    }
}

/* Fallback for browsers without View Transitions API */
@supports not (view-transition-name: root) {
    body {
        transition: background-color 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                   color 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .theme-toggle {
        transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    ::view-transition-new(root) {
        animation: none;
    }
    
    ::view-transition-old(root),
    [data-theme="dark"]::view-transition-old(root) {
        animation: none;
    }
}
