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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: #4b3621;
}

.min-h-screen {
    min-height: 100vh;
}

.bg-gradient {
    background: linear-gradient(135deg, #f9e4b7 0%, #f8d89c 100%);
}

/* Container and Card */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(75, 54, 33, 0.1);
    padding: 2rem;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.emoji {
    font-size: 2rem;
}

.controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Timer */
.timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clock-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: #4b3621;
}

.time-display {
    font-family: monospace;
    font-size: 1.1rem;
}

/* Buttons */
.button {
    background: #4b3621;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Email Box */
.email-box {
    margin-bottom: 2rem;
}

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

#emailInput {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e2d5c3;
    border-radius: 0.5rem;
    font-size: 1rem;
    color: #4b3621;
}

#emailInput:disabled {
    background: #f9f6f2;
    cursor: not-allowed;
}

.copy-button {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #4b3621;
}

.copy-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.copy-icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* Inbox */
.inbox-container {
    border: 2px solid #e2d5c3;
    border-radius: 0.5rem;
}

.inbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 2px solid #e2d5c3;
}

.refresh-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.refresh-icon {
    width: 24px;
    height: 24px;
    animation: spin 2s linear infinite;
}

.refresh-icon.paused {
    animation-play-state: paused;
}

/* Email List */
.email-list {
    max-height: 400px;
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #8b7355;
}

.subtitle {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Email Items */
.email-item {
    padding: 1.5rem;
    border-bottom: 1px solid #e2d5c3;
    transition: background-color 0.2s;
}

.email-item:hover {
    background-color: #f9f6f2;
}

.email-item.unread {
    background-color: #fff9e6;
}

.email-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.email-from {
    font-weight: 600;
}

.email-date {
    font-size: 0.9rem;
    color: #8b7355;
}

.email-subject {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.email-excerpt {
    font-size: 0.9rem;
    color: #666;
}

/* Error Message */
.error-message {
    background: #fee2e2;
    color: #991b1b;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.hidden {
    display: none;
}

/* Animations */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Copy Button Animation */
@keyframes copySuccess {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.copy-success {
    animation: copySuccess 0.3s ease-in-out;
}

/* Poop Animation */
@keyframes poopFloat {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

.poop-emoji {
    position: fixed;
    font-size: 2rem;
    pointer-events: none;
    animation: poopFloat 1s ease-out forwards;
}

/* Responsive Design */
@media (max-width: 640px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .controls {
        flex-direction: column;
        gap: 1rem;
    }

    .timer {
        justify-content: center;
    }
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.modal-header {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0.5rem;
}

.close-button:hover {
    color: #000;
}

.modal-body {
    padding: 1rem;
    overflow-y: auto;
    max-height: calc(90vh - 70px);
}

.email-info {
    margin-bottom: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.email-content {
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

/* System Email Styles */
.system-email {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.system-email:hover {
    background-color: inherit !important;
}

.system-email-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #f0f2f5;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

.seo-content {
    padding: 2rem;
    margin-top: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.seo-content h2 {
    color: #333;
    margin: 1.5rem 0 1rem;
    font-size: 1.5rem;
}

.seo-content p, .seo-content ul {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.seo-content ul {
    padding-left: 1.5rem;
    list-style-type: disc;
}

/* Blog Section Styles - Index Page */
.blog-section {
    padding: 2rem;
    margin-top: 2rem;
}

.blog-section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.blog-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
}

.blog-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-content {
    padding: 1.5rem;
}

.blog-content h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #333;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    color: #0066cc;
    text-decoration: none;
}

/* Blog Post Page Styles */
.blog-post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.blog-header {
    text-align: center;
    margin-bottom: 2rem;
}

.back-to-home {
    display: inline-block;
    margin-bottom: 1rem;
    color: #666;
    text-decoration: none;
}

.post-meta {
    color: #666;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.post-meta span {
    margin: 0 0.5rem;
}

.featured-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.blog-post-content h2 {
    color: #333;
    margin: 2rem 0 1rem;
}

.blog-post-content p {
    color: #444;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.blog-post-content ul,
.blog-post-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
    color: #444;
    line-height: 1.6;
} 