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

:root {
    --primary-color: #A0826D;
    --secondary-color: #C9A882;
    --accent-color: #D4A574;
    --bg-color: #FFF8F0;
    --card-bg: #FFFFFF;
    --text-color: #2C3E50;
    --text-secondary: #5D6D7E;
    --border-color: #E8D5C4;
    --success-color: #2ba640;
    --error-color: #E74C3C;
    --light-brown: #F5E6D3;
    --light-cream: #FFF8F0;
    --youtube-red: #FF0000;
}

body {
    font-family: 'Roboto', 'Segoe UI', Tahoma, sans-serif;
    background: linear-gradient(135deg, var(--light-teal) 0%, var(--light-yellow) 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #F5E6D3 0%, #FFF8F0 100%);
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    opacity: 0.2;
    animation: drift 15s infinite ease-in-out;
}

.shape-1 {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #D4A574, #C9A882);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    top: 15%;
    left: 15%;
    animation-delay: 0s;
    animation-duration: 18s;
}

.shape-2 {
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, #A0826D, #8B7355);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    top: 65%;
    left: 75%;
    animation-delay: 3s;
    animation-duration: 22s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #E8D5C4, #D4A574);
    border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;
    top: 35%;
    left: 25%;
    animation-delay: 5s;
    animation-duration: 20s;
}

.shape-4 {
    width: 110px;
    height: 110px;
    background: linear-gradient(135deg, #C9A882, #B89968);
    border-radius: 70% 30% 50% 50% / 30% 70% 30% 70%;
    top: 75%;
    left: 55%;
    animation-delay: 2s;
    animation-duration: 25s;
}

.shape-5 {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #F5E6D3, #E8D5C4);
    border-radius: 50% 50% 30% 70% / 50% 50% 70% 30%;
    top: 25%;
    left: 65%;
    animation-delay: 4s;
    animation-duration: 19s;
}

.shape-6 {
    width: 95px;
    height: 95px;
    background: linear-gradient(135deg, #D4A574, #C9A882);
    border-radius: 30% 70% 70% 30% / 70% 30% 30% 70%;
    top: 55%;
    left: 10%;
    animation-delay: 6s;
    animation-duration: 24s;
}

@keyframes drift {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    20% {
        transform: translate(50px, -40px) rotate(72deg);
        border-radius: 40% 60% 50% 50% / 60% 40% 60% 40%;
    }
    40% {
        transform: translate(-30px, 30px) rotate(144deg);
        border-radius: 70% 30% 30% 70% / 30% 70% 70% 30%;
    }
    60% {
        transform: translate(60px, 50px) rotate(216deg);
        border-radius: 50% 50% 70% 30% / 50% 50% 30% 70%;
    }
    80% {
        transform: translate(-40px, -20px) rotate(288deg);
        border-radius: 60% 40% 40% 60% / 40% 60% 60% 40%;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(32, 178, 170, 0.3);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    color: #FFFFFF;
}

.youtube-logo {
    width: 50px;
    height: 50px;
    background-color: var(--youtube-red);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 10px rgba(255, 0, 0, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(255, 0, 0, 0.6);
    }
}

.youtube-logo svg {
    width: 35px;
    height: 35px;
    fill: white;
}

/* Input Section */
.input-section {
    margin-bottom: 30px;
}

.input-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(32, 178, 170, 0.2);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.input-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(32, 178, 170, 0.3);
}

.input-card h2 {
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 1.5rem;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.video-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--light-teal);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.video-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(32, 178, 170, 0.2);
}

.hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Buttons */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(32, 178, 170, 0.4);
}

.btn-secondary {
    background: var(--border-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: var(--text-secondary);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.loader {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Summary Section */
.summary-section {
    margin-bottom: 30px;
}

.summary-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(32, 178, 170, 0.2);
    border: 2px solid var(--border-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.card-header h2 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    width: 28px;
    height: 28px;
    color: var(--primary-color);
}

.video-info {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--light-yellow);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.video-thumbnail {
    flex-shrink: 0;
}

.video-thumbnail img {
    width: 200px;
    height: auto;
    border-radius: 8px;
}

.video-details {
    flex: 1;
}

.video-details p {
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.summary-content {
    background: var(--light-teal);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    line-height: 1.8;
}

.summary-content p {
    margin-bottom: 15px;
}

/* Chat Section */
.chat-section {
    margin-bottom: 30px;
}

.chat-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(32, 178, 170, 0.2);
    border: 2px solid var(--border-color);
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 500px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--light-teal);
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.message {
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    animation: fadeIn 0.3s ease;
}

.message-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--light-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
}

.message-avatar svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

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

.message-content {
    max-width: 80%;
    padding: 15px 20px;
    border-radius: 15px;
    line-height: 1.6;
}

.user-message {
    justify-content: flex-end;
}

.user-message .message-content {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-bottom-right-radius: 5px;
    box-shadow: 0 2px 8px rgba(32, 178, 170, 0.3);
}

.bot-message {
    justify-content: flex-start;
}

.bot-message .message-content {
    background: var(--light-yellow);
    color: var(--text-color);
    border-bottom-left-radius: 5px;
    border: 1px solid var(--border-color);
}

.chat-input-container {
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--light-teal);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(32, 178, 170, 0.2);
}

/* Scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--border-color);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--text-color);
}

/* Error Message */
.error-message {
    background: var(--error-color);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(204, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

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

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

footer p {
    margin: 5px 0;
}

.creator {
    font-size: 1.1rem;
    margin-top: 15px;
    font-weight: 500;
}

.name-highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 1.3rem;
    animation: glow 2s ease-in-out infinite;
    position: relative;
    display: inline-block;
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(160, 130, 109, 0.6));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(212, 165, 116, 0.9));
    }
}

.social-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(32, 178, 170, 0.3);
}

.social-icon:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 25px rgba(32, 178, 170, 0.5);
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
}

.social-icon svg {
    width: 20px;
    height: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .input-group {
        flex-direction: column;
    }

    .video-info {
        flex-direction: column;
    }

    .video-thumbnail img {
        width: 100%;
    }

    .card-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .message-content {
        max-width: 90%;
    }

    .chat-container {
        height: 400px;
    }
}
