/* Press Release to Social Media Converter Styles */

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

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --error-color: #e53e3e;
    --warning-color: #ed8936;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 5px 15px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
    --border-radius: 10px;
    --border-radius-lg: 15px;
    --border-radius-xl: 20px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
    color: var(--text-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    min-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
    flex: 1;
}

.input-section, .output-section {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    height: fit-content;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.cache-indicator {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 12px;
    background: var(--success-color);
    color: white;
    margin-left: auto;
    opacity: 0;
    transition: var(--transition);
}

.cache-indicator.show {
    opacity: 1;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

textarea, input[type="url"] {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: var(--transition);
    background: var(--bg-primary);
}

textarea {
    min-height: 200px;
    line-height: 1.5;
}

textarea:focus, input[type="url"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.char-counter.warning {
    color: var(--warning-color);
}

.char-counter.error {
    color: var(--error-color);
}

small {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Platform Selector */
.platform-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.platform-btn {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.platform-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.platform-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.platform-icon {
    font-size: 1.2rem;
}

/* Convert Button */
.convert-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.convert-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

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

.loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Info Panel */
.info-panel {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 20px;
    border-left: 4px solid var(--primary-color);
}

.info-panel h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 1rem;
}

.info-panel ul {
    list-style: none;
    padding-left: 0;
}

.info-panel li {
    padding: 5px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    position: relative;
    padding-left: 20px;
}

.info-panel li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* Output Section */
.output-container {
    max-height: 500px;
    overflow-y: auto;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 15px;
    background: var(--bg-secondary);
}

.output-container::-webkit-scrollbar {
    width: 8px;
}

.output-container::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

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

.output-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Social Posts */
.social-post {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.social-post:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.social-post:last-child {
    margin-bottom: 0;
}

.social-post.error {
    border-left-color: var(--error-color);
    background: #fed7d7;
}

.post-platform {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-content {
    line-height: 1.6;
    margin-bottom: 15px;
    color: var(--text-primary);
    white-space: pre-wrap;
}

.hashtags {
    color: var(--primary-color);
    font-weight: 500;
    word-wrap: break-word;
    line-height: 1.4;
}

.copy-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 10px;
    transition: var(--transition);
    font-weight: 500;
}

.copy-btn:hover {
    background: #38a169;
    transform: translateY(-1px);
}

.copy-btn.copied {
    background: var(--success-color);
    transform: scale(0.95);
}

/* Empty State */
.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
    fill: currentColor;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.empty-state small {
    font-size: 0.9rem;
    margin-top: 8px;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--bg-primary);
    margin: 10% auto;
    padding: 30px;
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.close {
    color: var(--text-muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
}

.close:hover {
    color: var(--text-primary);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .header p {
        font-size: 1rem;
    }

    .platform-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .input-section, .output-section {
        padding: 20px;
    }

    .footer {
        padding: 15px 20px;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

    .modal-content {
        margin: 20% auto;
        width: 95%;
        padding: 20px;
    }