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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0052FF 0%, #0094FF 100%);
    min-height: 100vh;
    padding: 30px 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Header Styles */
header {
    text-align: center;
    color: white;
    margin-bottom: 50px;
    padding: 40px 0;
}

.logo-container {
    animation: fadeInDown 0.8s ease;
}

.logo-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

header h1 {
    font-size: 3.5em;
    font-weight: 700;
    margin-bottom: 0;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    letter-spacing: -1px;
}

.logo-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.35em;
    font-weight: 600;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
}

.subtitle {
    font-size: 1.4em;
    opacity: 0.95;
    font-weight: 500;
    margin-bottom: 8px;
}

.tagline {
    font-size: 1.1em;
    opacity: 0.85;
    font-weight: 400;
}

/* Section Styles */
.config-section,
.generator-section {
    background: white;
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    animation: fadeInUp 0.6s ease;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.config-section:hover,
.generator-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
}

.status-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border: 2px solid rgba(0, 82, 255, 0.1);
}

.primary-section {
    border-top: 4px solid #0052FF;
}

.secondary-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.section-icon {
    font-size: 2.5em;
    line-height: 1;
}

.section-header h2 {
    color: #1a1a1a;
    margin-bottom: 5px;
    font-size: 1.8em;
    font-weight: 700;
}

.section-description {
    color: #666;
    font-size: 0.95em;
    margin-top: 5px;
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    animation: pulse 2s infinite;
}

.status-dot.connected {
    background: #4CAF50;
}

.status-dot.error {
    background: #f44336;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.config-section h2 {
    color: #0052FF;
    margin-bottom: 8px;
    font-size: 1.5em;
    font-weight: 700;
}

.api-info {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95em;
    line-height: 1.6;
}

/* Form Elements */
.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1a1a1a;
    font-size: 0.95em;
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fafafa;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: #0052FF;
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 82, 255, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-copy {
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #0052FF 0%, #0094FF 100%);
    color: white;
    width: 100%;
    font-size: 1.05em;
    padding: 18px 32px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 82, 255, 0.35);
}

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

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

.btn-secondary-style {
    background: linear-gradient(135deg, #00A3FF 0%, #00D4FF 100%);
}

.btn-arrow {
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.btn-primary:hover .btn-arrow {
    transform: translateX(3px);
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #ebebeb;
    border-color: #d0d0d0;
}

.btn-small {
    padding: 10px 20px;
    font-size: 0.9em;
}

.btn-copy {
    background: #4CAF50;
    color: white;
    padding: 12px 24px;
    font-size: 0.95em;
}

.btn-copy:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* Output Boxes */
.output-box {
    margin-top: 35px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    border: 2px solid #e8eef5;
    animation: slideIn 0.4s ease;
}

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

.output-box.hidden {
    display: none;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e8eef5;
}

.output-header h3 {
    color: #1a1a1a;
    font-size: 1.3em;
    font-weight: 700;
}

.post-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    line-height: 1.9;
    white-space: pre-wrap;
    font-size: 1em;
    color: #1a1a1a;
    border: 1px solid #e8eef5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.image-container img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Status Messages */
.status-message {
    display: inline-block;
    margin-left: 15px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    animation: fadeIn 0.3s ease;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
}

/* Loading Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0052FF;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 0.8s linear infinite;
    margin: 30px auto;
}

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

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 20px 15px;
    }

    header h1 {
        font-size: 2.2em;
    }
    
    .subtitle {
        font-size: 1.1em;
    }

    .tagline {
        font-size: 0.95em;
    }

    .logo-text {
        flex-direction: column;
        gap: 10px;
    }

    .config-section,
    .generator-section {
        padding: 25px 20px;
    }

    .section-header {
        flex-direction: column;
        gap: 10px;
    }

    .section-icon {
        font-size: 2em;
    }
    
    .output-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .btn-copy {
        width: 100%;
    }

    .status-indicator {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .config-section,
    .btn-primary,
    .btn-secondary,
    .btn-copy {
        display: none;
    }
}
