:root {
    --bg: #111111;
    --card: #1a1a1a;
    --border: #333333;
    --text: #f5f5f5;
    --subtle: #aaaaaa;
    --primary: #3498db;
    --primary-hover: #2980b9;
    --selection-ring: #f1c40f;
    --success: #27ae60;
    --success-border: #2ecc71;
    --success-text: #55efc4;
    --error: #c0392b;
    --error-border: #e74c3c;
    --error-text: #fab1a0;
    --info: #2c3e50;
    --info-border: #34495e;
    --info-text: #dfe6e9;
    --teal: #1abc9c;
    --cyan: #00cec9;
    --purple: #9b59b6;
    --blue: #3498db;
    --orange: #e67e22;
    --lime: #a3cb38;
    --coral: #ff7675;
    --brown: #6d4c41;
    --blue-grey: #636e72;
    --gold: #fdcb6e;
    --pink: #fd79a8;
    --dark-red: #d63031;
    --green: #00b894;
    --deep-purple: #6c5ce7;
    --indigo: #5d6afa;
    --light-teal: #81ecec;
    --gap-base: 1.5rem;
    --gap-small: 0.75rem;
}

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

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body { 
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    padding: 1rem;
    overflow-y: auto;
}

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

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

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

.page-wrapper { 
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    animation: fadeIn 0.6s ease-out;
    display: flex;
    flex-direction: column;
    gap: var(--gap-base);
}

.header {
    background: var(--card);
    padding: 2rem 1.5rem;
    text-align: center;
    border-radius: 12px;
    border: 1px solid var(--border);
    animation: fadeIn 0.8s ease-out;
    position: relative;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF5252, #2196F3, #4CAF50, #E91E63, #FF9800, #3F51B5, #FFEB3B, #7B1FA2);
    animation: slideIn 0.8s ease-out;
}

.header h1 { 
    margin: 0 0 0.5rem 0; 
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--primary);
    font-weight: 800;
    letter-spacing: -0.5px;
    animation: fadeIn 1s ease-out;
}

.header div {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--subtle);
    font-weight: 500;
    animation: fadeIn 1.2s ease-out;
}

.main-container {
    display: flex;
    gap: var(--gap-base);
    animation: fadeIn 1s ease-out;
    width: 100%;
    align-items: flex-start;
}

.left-column {
    flex: 3;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--gap-base);
}

.right-column {
    flex: 2;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--gap-base);
}

.card { 
    background: var(--card); 
    border-radius: 12px; 
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.6s ease-out;
    opacity: 0;
    animation-fill-mode: forwards;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    border-color: rgba(52, 152, 219, 0.3);
}

.card-header {
    padding: 1rem 1.25rem; 
    color: #fff; 
    font-weight: 700; 
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.card-header i {
    font-size: 1rem;
}

.card-content { 
    padding: 1.25rem; 
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
}

.card.guestbook-card {
    min-height: 450px;
}

.guestbook-card .card-content {
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.input-group {
    display: flex; 
    gap: 0.5rem; 
    margin-bottom: 0.5rem; 
}

input, button, select {
    padding: 0.75rem 0.875rem; 
    border: none; 
    background: #222222; 
    color: var(--text);
    border-radius: 8px; 
    font-size: clamp(0.8rem, 1.3vw, 0.9rem);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

input { 
    flex: 1; 
    min-width: 0;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.btn {
    background: var(--primary); 
    color: white; 
    border: none; 
    cursor: pointer; 
    font-weight: 600; 
    padding: 0.75rem 1rem; 
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
    font-size: clamp(0.8rem, 1.3vw, 0.9rem);
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(52, 152, 219, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.source-buttons {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.source-btn {
    background: #222222;
    color: var(--subtle);
    border: 1px solid var(--border);
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: clamp(0.7rem, 1.2vw, 0.8rem);
    flex-shrink: 0;
    transition: all 0.2s ease;
    font-weight: 500;
}

.source-btn:hover {
    background: rgba(52, 152, 219, 0.1);
    color: var(--primary);
    border-color: rgba(52, 152, 219, 0.3);
}

.source-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.footer {
    background: var(--card);
    color: var(--subtle);
    text-align: center;
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    animation: fadeIn 1.2s ease-out;
    margin-top: 0.5rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.footer-content a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
}

.footer-content a:hover {
    color: var(--primary-hover);
    background: rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

.separator { 
    border-top: 1px solid var(--border); 
    margin: 0.75rem 0;
}

.guestbook-iframe {
    width: 100%;
    border: none;
    border-radius: 8px;
    background: var(--card);
    height: 450px;
    min-height: 450px;
    border: 1px solid var(--border);
    flex: 1;
}

.blog-iframe {
    width: 100%;
    border: none;
    border-radius: 0 0 8px 8px;
    background: var(--card);
    height: 100%;
    min-height: 450px;
    border: none;
    flex: 1;
}

#catpic {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    cursor: pointer;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

#catpic:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.content-box {
    background: #222222; 
    padding: 0.875rem; 
    border-radius: 8px;
    border-left: 4px solid;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    overflow: hidden;
}

.content-box:hover {
    border-color: rgba(52, 152, 219, 0.3);
    transform: translateX(4px);
}

.card { animation-delay: calc(var(--order) * 0.1s); }

#messageBox {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    z-index: 50;
    border: 1px solid;
    display: none;
    max-width: min(90%, 400px);
    font-weight: 600;
    animation: fadeIn 0.3s ease-out;
}

#messageBox.success {
    background: var(--success);
    border-color: var(--success-border);
    color: var(--success-text);
}

#messageBox.error {
    background: var(--error);
    border-color: var(--error-border);
    color: var(--error-text);
}

.weather-temp {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

audio {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
}

iframe:not(.guestbook-iframe):not(.blog-iframe) {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.responsive-text {
    font-size: clamp(0.8rem, 1.3vw, 0.9rem);
    color: var(--subtle);
    line-height: 1.5;
    overflow-wrap: break-word;
}

.section-title {
    font-size: clamp(0.75rem, 1.2vw, 0.85rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--subtle);
    margin: 0.25rem 0;
}

.games-header { background: linear-gradient(135deg, #FF5252 0%, #D32F2F 100%); }
.quizzes-header { background: linear-gradient(135deg, #FF8A80 0%, #FF5252 100%); }
.videos-header { background: linear-gradient(135deg, #D50000 0%, #B71C1C 100%); }
.movies-header { background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%); }
.weather-header { background: linear-gradient(135deg, #03A9F4 0%, #0288D1 100%); }
.recipes-header { background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%); }
.library-header { background: linear-gradient(135deg, #00E676 0%, #00C853 100%); }
.music-header { background: linear-gradient(135deg, #E91E63 0%, #C2185B 100%); }
.blog-header { background: linear-gradient(135deg, #F48FB1 0%, #EC407A 100%); }
.kitties-header { background: linear-gradient(135deg, #FFB74D 0%, #FF9800 100%); }
.series-header { background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%); }
.guestbook-header { background: linear-gradient(135deg, #3F51B5 0%, #303F9F 100%); }
.anime-header { background: linear-gradient(135deg, #BA68C8 0%, #9C27B0 100%); }
.streams-header { background: linear-gradient(135deg, #7B1FA2 0%, #4A148C 100%); }

#statuscafe {
    padding: 1.25rem;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#statuscafe-username {
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

#statuscafe-content {
    margin: 0 0 1rem 0;
    color: var(--subtle);
    line-height: 1.6;
    font-size: 0.95rem;
    padding: 0.75rem;
    background: #222222;
    border-radius: 6px;
    border-left: 3px solid var(--primary);
}

#statuscafe-content p {
    margin: 0 0 0.5rem 0;
}

#statuscafe-content p:last-child {
    margin-bottom: 0;
}

#statuscafe-content a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

#statuscafe-content a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

#statuscafe-content + div,
#statuscafe-content small {
    color: var(--subtle);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: block;
    opacity: 0.8;
}

@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
    }
    
    .left-column, .right-column {
        flex: none;
        width: 100%;
    }
    
    .guestbook-iframe,
    .blog-iframe {
        height: 400px;
        min-height: 400px;
    }
    
    .card-header {
        font-size: 0.95rem;
    }
    
    .card-content {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    input, button, select {
        font-size: 0.85rem;
    }
    
    .btn {
        font-size: 0.85rem;
        padding: 0.75rem 1rem;
    }
    
    .source-btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
    
    #statuscafe {
        padding: 1rem;
    }
    
    #statuscafe-username {
        font-size: 1rem;
    }
    
    #statuscafe-content {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0.75rem;
    }
    
    .page-wrapper {
        gap: 1rem;
    }
    
    .header {
        padding: 1.5rem 1rem;
        margin-bottom: 0.25rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .btn, input, select {
        width: 100%;
    }
    
    .source-buttons {
        justify-content: center;
    }
    
    .footer {
        padding: 1rem;
        margin-top: 0.25rem;
    }
    
    .guestbook-iframe,
    .blog-iframe {
        height: 380px;
        min-height: 380px;
    }
    
    #statuscafe {
        padding: 0.875rem;
    }
    
    #statuscafe-username {
        font-size: 0.95rem;
    }
    
    #statuscafe-content {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .card-header {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
    
    .card-content {
        padding: 0.875rem;
    }
    
    input, button, select {
        padding: 0.625rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .btn {
        padding: 0.625rem 0.875rem;
        font-size: 0.8rem;
    }
    
    .guestbook-iframe,
    .blog-iframe {
        height: 350px;
        min-height: 350px;
    }
    
    #catpic {
        max-height: 200px;
    }
    
    #statuscafe {
        padding: 0.75rem;
    }
    
    #statuscafe-username {
        font-size: 0.9rem;
    }
    
    #statuscafe-content {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}

@media (min-width: 1600px) {
    .page-wrapper {
        max-width: 1800px;
    }
    
    .main-container {
        gap: 2rem;
    }
    
    .left-column, .right-column {
        gap: 2rem;
    }
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--subtle);
}

.card-content > *:last-child {
    margin-bottom: 0;
}

.card-content p, .card-content div {
    overflow-wrap: break-word;
    word-break: break-word;
}

.card-content img {
    max-width: 100%;
    height: auto;
}

.right-column .card {
    min-height: auto;
}

.right-column .card-content {
    gap: 0.75rem;
}

.left-column .card.games-card {
    min-height: 500px;
}
