/* style.css - Tách từ index.html */
:root {
    --primary-color: #ffb6c1;
    --primary-light: #ffd9ef;
    --secondary-color: #a2d2ff;
    --secondary-light: #d8eeff;
    --accent-color: #ffd166;
    --text-color: #565656;
    --dark-text: #333333;
    --background-color: #fff9fb;
    --card-background: rgba(255, 255, 255, 0.9);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    --glass-background: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --border-radius: 24px;
    --small-radius: 16px;
    --transition: all 0.3s ease;
}

.dark-theme {
    --primary-color: #ff8fab;
    --primary-light: #ff8fab50;
    --secondary-color: #90c1ff;
    --secondary-light: #90c1ff50;
    --accent-color: #ffcb47;
    --text-color: #e0e0e0;
    --dark-text: #ffffff;
    --background-color: #121212;
    --card-background: rgba(30, 30, 30, 0.9);
    --glass-background: rgba(30, 30, 30, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: var(--transition);
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

header {
    background: var(--glass-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 1.2rem;
    box-shadow: var(--glass-shadow);
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    position: relative;
    z-index: 10;
}

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

header h1 {
    color: var(--dark-text);
    font-weight: 700;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle {
    background: var(--primary-light);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--dark-text);
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

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

.social-section {
    margin: 1rem auto 1.5rem;
    max-width: 1600px;
    padding: 0 1.5rem;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 1rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-background);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
    color: var(--dark-text);
    font-size: 1.2rem;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    box-shadow: var(--shadow);
}

.social-icon:hover {
    transform: translateY(-5px) scale(1.1);
}

.social-icon.facebook:hover {
    background-color: #1877f2;
    color: white;
}

.social-icon.twitter:hover {
    background-color: #1da1f2;
    color: white;
}

.social-icon.instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white;
}

.social-icon.youtube:hover {
    background-color: #ff0000;
    color: white;
}

.social-icon.tiktok:hover {
    background: linear-gradient(45deg, #010101, #69C9D0, #EE1D52);
    color: white;
}

.container {
    flex: 1;
    padding: 0 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 5;
}

.sheet-container {
    background: var(--card-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    height: calc(100vh - 240px);
    position: relative;
    border: 2px solid var(--primary-light);
    transition: transform 0.3s ease;
}

.sheet-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    box-sizing: border-box;
}

.mobile-sheet-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

@media (max-width: 768px) {
    .mobile-sheet-wrapper {
        width: 100%;
        height: 70vh;
        position: relative;
        overflow: hidden;
    }
    
    .mobile-sheet-wrapper iframe {
        width: 250%;
        height: 200%;
        border: none;
        box-sizing: border-box;
        /* Scale sẽ được xử lý bằng JavaScript */
        transform-origin: 0 0;
    }
    
    .open-sheet-container {
        text-align: center;
        margin: 1.5rem 0 1rem;
    }
    
    .open-sheet-btn {
        font-size: 1rem;
        padding: 12px 24px;
        border-radius: 20px;
        display: inline-block;
        background: var(--primary-light);
        color: var(--dark-text);
        text-decoration: none;
        font-weight: 600;
        box-shadow: var(--shadow);
        transition: transform 0.3s ease, background-color 0.3s ease;
        position: relative;
    }
    
    .open-sheet-btn:hover {
        transform: translateY(-3px);
        background-color: var(--primary-color);
    }
    
    .open-sheet-btn:active {
        transform: translateY(1px);
    }
}

.loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-text {
    margin-top: 1rem;
    font-size: 1rem;
    color: var(--dark-text);
    letter-spacing: 1px;
}

.spinner {
    width: 60px;
    height: 60px;
    position: relative;
}

.spinner-item {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

.spinner-item:nth-child(1) {
    border-top-color: var(--primary-color);
    animation-delay: 0s;
}

.spinner-item:nth-child(2) {
    border-right-color: var(--secondary-color);
    animation-delay: 0.4s;
}

.spinner-item:nth-child(3) {
    border-bottom-color: var(--accent-color);
    animation-delay: 0.8s;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.decorations {
    position: fixed;
    z-index: 1;
    user-select: none;
    pointer-events: none;
}

.decoration-item {
    position: absolute;
    font-size: 2rem;
    opacity: 0.6;
    animation: float 10s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(10px, -15px) rotate(5deg);
    }
    50% {
        transform: translate(0, -25px) rotate(0deg);
    }
    75% {
        transform: translate(-10px, -15px) rotate(-5deg);
    }
}

footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
    color: var(--text-color);
    position: relative;
    z-index: 10;
    margin-top: 1rem;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

.blur-circle {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
}

.blur-1 {
    width: 300px;
    height: 300px;
    background-color: var(--primary-light);
    top: -50px;
    right: -50px;
    animation: pulse 15s infinite ease-in-out;
}

.blur-2 {
    width: 400px;
    height: 400px;
    background-color: var(--secondary-light);
    bottom: -100px;
    left: -100px;
    animation: pulse 20s infinite ease-in-out reverse;
}

@media (max-width: 768px) {
    header {
        padding: 1rem;
    }
    .header-content h1 {
        font-size: 1.4rem;
    }
    .sheet-container {
        height: calc(100vh - 220px);
    }
    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    .social-icons {
        gap: 0.8rem;
    }
    .social-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .sheet-container {
        height: calc(100vh - 240px);
    }
    .header-content h1 {
        font-size: 1.2rem;
    }
}

.sheet-controls {
    display: none;
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 20;
}

.sheet-control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-background);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
    color: var(--dark-text);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 5px;
    cursor: pointer;
    box-shadow: var(--shadow);
}

@media (max-width: 768px) {
    .sheet-controls {
        display: flex;
    }
}
