body, html {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background-color: #1e1e1e;
    color: #e0e0e0;
    height: 100%;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
}

.editor-panel {
    width: 450px;
    padding: 25px 35px;
    background-color: #252526;
    display: flex;
    flex-direction: column;
    z-index: 10;
    transition: width 0.3s ease;
    border-right: 1px solid #333333;
}

.header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.logo {
    width: 40px;
    height: 40px;
    margin-right: 15px;
}

.credit-display {
    display: flex;
    align-items: center;
    background-color: #3c3c3c;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    margin-left: auto;
}

#credit-count {
    font-weight: 700;
    margin-right: 6px;
    color: #00e676;
}

.credit-label {
    color: #a0a0a0;
}

.editor-panel h1 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.editor-panel p {
    font-size: 15px;
    color: #a0a0a0;
    margin-bottom: 20px;
    line-height: 1.4;
}

#prompt-input {
    flex-grow: 1;
    border: 1px solid #3c3c3c;
    background-color: #1e1e1e;
    color: #e0e0e0;
    border-radius: 8px;
    padding: 14px;
    font-size: 16px;
    font-family: inherit;
    resize: none;
    margin-bottom: 20px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

#prompt-input:focus {
    outline: none;
    border-color: #007acc;
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.3);
}

#generate-btn {
    background: #007acc;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px 20px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50px;
}

#generate-btn:hover:not(:disabled) {
    background: #008ae6;
    transform: translateY(-1px);
}

#generate-btn:disabled {
    background: #333;
    color: #888;
    cursor: not-allowed;
    transform: none;
}

.preview-panel {
    flex-grow: 1;
    display: flex;
    background-color: #1e1e1e;
}

#preview-frame {
    width: 100%;
    height: 100%;
    border: none;
    background-color: #ffffff;
}

#credit-timer-info {
    text-align: center;
    margin-top: 15px;
    color: #a0a0a0;
    font-size: 14px;
}

#countdown {
    font-weight: 500;
    color: #e0e0e0;
}

.loader {
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

.hidden {
    display: none;
}

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

@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }
    .editor-panel {
        width: 100%;
        height: 50vh;
        box-sizing: border-box;
        border-right: none;
        border-bottom: 1px solid #333333;
    }
    .preview-panel {
        height: 50vh;
    }
}