/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Mobile Layout */
.mobile-layout {
    display: block;
}

.desktop-layout {
    display: none;
}

/* Desktop Layout */
@media (min-width: 768px) {
    .mobile-layout {
        display: none;
    }
    
    .desktop-layout {
        display: flex;
        gap: 40px;
        align-items: flex-start;
    }
    
    .left-panel {
        flex: 0 0 35%; /* 35% width for controls */
    }
    
    .right-panel {
        flex: 1; /* 65% width for output */
    }
}

/* Common Section Styles */
.input-section,
.button-section,
.output-section,
.download-section {
    margin-bottom: 32px;
}

label {
    display: block;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 12px;
    color: #000000;
}

/* Input Styles */
textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
    background-color: #ffffff;
}

textarea:focus {
    outline: none;
    border-color: #000000;
}

textarea::placeholder {
    color: #8e8e93;
}

/* Attribution Text */
.attribution-text {
    text-align: center;
    font-size: 12px;
    color: #8e8e93;
    margin-top: 8px;
    line-height: 1.4;
}

.attribution-text a {
    color: #8e8e93;
    text-decoration: none;
}

.attribution-text a:hover {
    color: #666666;
    text-decoration: underline;
}

/* Button Styles */
.prompt-btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    margin-bottom: 12px;
    background-color: #000000;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prompt-btn:hover {
    background-color: #333333;
    transform: translateY(-1px);
}

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

/* Output Box */
.output-box {
    min-height: 200px;
    padding: 20px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    background-color: #f8f8f8;
    font-size: 16px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;
}

.placeholder {
    color: #8e8e93;
    font-style: italic;
}

/* Download Button */
.download-btn {
    width: 100%;
    padding: 16px 24px;
    background-color: #007aff;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.download-btn:hover:not(:disabled) {
    background-color: #0056cc;
    transform: translateY(-1px);
}

.download-btn:disabled {
    background-color: #e5e5e5;
    color: #8e8e93;
    cursor: not-allowed;
    transform: none;
}

/* Coffee Section */
.coffee-section {
    margin-top: 20px;
    text-align: center;
    padding: 16px;
    background-color: transparent;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .container {
        padding: 16px;
    }
    
    .input-section,
    .button-section,
    .output-section,
    .download-section {
        margin-bottom: 24px;
    }
    
    textarea {
        padding: 14px;
        font-size: 16px;
    }
    
    .prompt-btn,
    .download-btn {
        padding: 14px 20px;
        font-size: 16px;
    }
}
