@view-transition {
    navigation: auto;
}

/* Star Wipe Animations */

::view-transition-old(root) {
    animation: star-wipe-out 0.9s ease-in-out;
}

::view-transition-new(root) {
    animation: star-wipe-in 0.9s ease-in-out;
}

@keyframes star-wipe-out {
    /* Required to keep old page visible during transition */
}

@keyframes star-wipe-in {
    from {
        clip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%);
    }
    to {
        clip-path: polygon(calc(50vmin + 50vw - 50vmin) -300vmin, calc(188vmin + 50vw - 50vmin) -24vmin, calc(484vmin + 50vw - 50vmin) -24vmin, calc(244vmin + 50vw - 50vmin) 152vmin, calc(332vmin + 50vw - 50vmin) 424vmin, calc(50vmin + 50vw - 50vmin) 256vmin, calc(-232vmin + 50vw - 50vmin) 424vmin, calc(-144vmin + 50vw - 50vmin) 152vmin, calc(-384vmin + 50vw - 50vmin) -24vmin, calc(-88vmin + 50vw - 50vmin) -24vmin);
    }
}

/* Base Page Styling - Shared */
body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    color: white;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Navigation Button - Shared */
.nav-button {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 12px 24px;
    font-size: 1.1rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    backdrop-filter: blur(10px);
    opacity: 0;
    animation: fadeInButton 0.3s ease-out 1s forwards;
}

.nav-button:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Page 1 Specific Styles */
.page-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.page-1 .stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.page-1 .star {
    position: absolute;
    background: white;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: twinkle 2s infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.3; transform: scale(1); }
    100% { opacity: 0.8; transform: scale(1.1); }
}

/* Page 2 Specific Styles */
.page-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.page-2 .hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.page-2 .hearts .heart {
    position: absolute;
    color: rgba(255,255,255,0.7);
    font-size: 20px;
    animation: float 3s infinite ease-in-out;
}

.page-2 .constellation {
    position: fixed;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* Shared Animations */
@keyframes fadeInButton {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Interactive Sparkle Effects */
@keyframes sparkle-pop {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 1; }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

@keyframes sparkle-burst {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.5) rotate(180deg); opacity: 1; }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

/* Browser Support Notice */
.browser-notice {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.1);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.made-by {
    background: rgba(255,255,255,0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.made-by:hover {
    background: rgba(255,255,255,0.2);
}

.github-code {
    background: rgba(255,255,255,0.1);
    padding: 8px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.github-code:hover {
    background: rgba(255,255,255,0.2);
}

.bottom-buttons {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 1000;
}

.made-by svg,
.github-code svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Grab Code Button */
.grab-code-button {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 12px 24px;
    font-size: 1.1rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    margin-top: 20px;
    font-family: 'Arial', sans-serif;
    opacity: 0;
    animation: fadeInButton 0.3s ease-out 1.2s forwards;
}

.grab-code-button:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Modal Styles */
.code-modal {
    border: none;
    border-radius: 12px;
    padding: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@starting-style {
    .code-modal {
        opacity: 0;
        transform: translateY(8px);
    }
    
    .code-modal::backdrop {
        opacity: 0;
    }
}

.code-modal::backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Code Snippet Component */
.code-snippet {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #e6e6e6;
    max-width: 600px;
    max-height: 80vh;
    overflow: auto;
    overflow-x: auto;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
}

/* Custom Scrollbars */
.code-snippet::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.code-snippet::-webkit-scrollbar-track {
    background: #37181f;
    border-radius: 4px;
}

.code-snippet::-webkit-scrollbar-thumb {
    background: #592d37;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.code-snippet::-webkit-scrollbar-thumb:hover {
    background: #5e313b;
}

.code-snippet::-webkit-scrollbar-corner {
    background: #592d37;
    border-radius: 4px;
}

.code-snippet-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    gap: 10px;
    background: rgba(0, 0, 0, 0.9);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.copy-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Arial', sans-serif;
}

.copy-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.copy-button.copied {
    background: #4ecdc4;
    border-color: #4ecdc4;
}

.code-snippet-content {
    padding: 20px;
}

.code-snippet h3 {
    color: #ff6b9d;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
}

.code-snippet div {
    text-align: left;
}

.code-snippet .highlight {
    color: #4ecdc4;
    font-weight: bold;
}

.code-snippet .comment {
    color: #888;
    font-style: italic;
}

.code-snippet .property {
    color: #f9ca24;
}

.code-snippet .value {
    color: #f0932b;
}

.code-snippet .selector {
    color: #ff6b9d;
}

.code-snippet .animation {
    color: #4ecdc4;
}

.code-snippet .keyframes {
    color: #f0932b;
}

/* Like Component Styles */
.like-component {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    opacity: 0;
    animation: fadeInButton 0.3s ease-out 0.8s forwards;
}

.like-button {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 40px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    font-family: 'Arial', sans-serif;
}

.like-button:hover {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.like-button:active {
    transform: translateY(0);
}

.like-button.liked .heart {
    animation: heartPulse 0.4s ease;
}

.like-button .heart {
    font-size: 16px;
    line-height: 1;
    transition: all 0.2s ease;
}

.like-button .like-count {
    color: white;
    font-size: 14px;
    font-weight: 600;
    min-width: 18px;
    text-align: left;
}

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