/* Reset ve Temel Stiller */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #8b0000 0%, #4a0000 30%, #2d0000 60%, #000000 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    animation: gradientShift 8s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background: linear-gradient(135deg, #8b0000 0%, #4a0000 30%, #2d0000 60%, #000000 100%);
    }
    25% {
        background: linear-gradient(135deg, #a00000 0%, #5a0000 30%, #350000 60%, #1a1a1a 100%);
    }
    50% {
        background: linear-gradient(135deg, #900000 0%, #500000 30%, #300000 60%, #424242 100%);
    }
    75% {
        background: linear-gradient(135deg, #950000 0%, #550000 30%, #320000 60%, #212121 100%);
    }
}

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

/* Header */
.header {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.95) 0%, rgba(74, 0, 0, 0.9) 30%, rgba(45, 0, 0, 0.9) 60%, rgba(0, 0, 0, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(220, 20, 60, 0.3);
}

.header h1 {
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 700;
}

.header h1 i {
    color: #dc143c;
    margin-right: 10px;
}

.balance-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* User Authentication Styles */
.user-section, .guest-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 600;
}

.user-info i {
    font-size: 1.5rem;
    color: #dc143c;
}

.user-actions {
    display: flex;
    gap: 10px;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.btn-outline {
    background: transparent;
    color: #ffffff !important;
    border: 2px solid rgba(220, 20, 60, 0.6);
    padding: 8px 16px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: rgba(220, 20, 60, 0.8);
    color: white !important;
    border-color: rgba(220, 20, 60, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3);
}

.btn-outline i {
    color: #ffffff !important;
}

.balance-display {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.balance-display i {
    margin-right: 8px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
}

.btn-copy {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    padding: 8px 16px;
    font-size: 0.9rem;
    margin-top: 10px;
}

.btn-copy:hover {
    transform: translateY(-1px);
}

/* Sections */
.input-section, .api-section, .results-section {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.95) 0%, rgba(74, 0, 0, 0.9) 30%, rgba(45, 0, 0, 0.9) 60%, rgba(0, 0, 0, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(220, 20, 60, 0.3);
}

.input-section h2, .api-section h2, .results-section h2 {
    color: #ffffff;
    font-size: 1.8rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-section h2 i, .api-section h2 i, .results-section h2 i {
    color: #dc143c;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: #dc143c;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #333;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #1a1a1a;
    color: #ffffff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #dc143c;
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.2);
}

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

/* API Grid */
.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.api-card {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border: 2px solid #333;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.api-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: #dc143c;
}

.api-card.disabled {
    opacity: 0.6;
    background: linear-gradient(135deg, #0f0f0f, #1a1a1a);
}

.api-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.api-header h3 {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
}

.api-cost {
    color: #dc143c;
    font-weight: 600;
    font-size: 0.95rem;
}

.cost-value {
    color: #f56565;
    font-weight: 700;
}

/* Toggle Switch */
.api-toggle {
    position: relative;
}

.api-toggle input[type="checkbox"] {
    display: none;
}

.toggle-label {
    display: block;
    width: 50px;
    height: 26px;
    background: #cbd5e1;
    border-radius: 13px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.toggle-label::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.api-toggle input[type="checkbox"]:checked + .toggle-label {
    background: #4CAF50;
}

.api-toggle input[type="checkbox"]:checked + .toggle-label::after {
    transform: translateX(24px);
}

/* Blog Results */
.blog-results {
    display: grid;
    gap: 25px;
}

.blog-card {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    position: relative;
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

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

.blog-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.copy-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-btn:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.blog-content {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.blog-content .formatted-content {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #2d3748;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.blog-content .formatted-content strong {
    font-weight: 700;
    color: #1a202c;
}

.blog-content pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #2d3748;
}

.blog-api-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 10px;
}

.blog-api-name i {
    color: #667eea;
}

.blog-content {
    color: #4a5568;
    line-height: 1.8;
    font-size: 1rem;
    margin-bottom: 15px;
}

.blog-content h1, .blog-content h2, .blog-content h3, 
.blog-content h4, .blog-content h5, .blog-content h6 {
    color: #2d3748;
    margin: 15px 0 10px 0;
    font-weight: 700;
}

.blog-content h1 { font-size: 2rem; }
.blog-content h2 { font-size: 1.7rem; }
.blog-content h3 { font-size: 1.4rem; }
.blog-content h4 { font-size: 1.2rem; }
.blog-content h5 { font-size: 1.1rem; }
.blog-content h6 { font-size: 1rem; }

.blog-content strong, .blog-content b {
    color: #2d3748;
    font-weight: 700;
}

.blog-content p {
    margin-bottom: 12px;
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading p {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Progress Bar */
.progress-container {
    width: 300px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 3px;
    margin-top: 10px;
    position: relative;
}

.progress-bar {
    height: 20px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 20px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

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

.modal-content {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.95) 0%, rgba(74, 0, 0, 0.9) 30%, rgba(45, 0, 0, 0.9) 60%, rgba(0, 0, 0, 0.95) 100%);
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(220, 20, 60, 0.3);
    color: #ffffff;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 15px;
    cursor: pointer;
}

.close:hover {
    color: #667eea;
}

.modal-content h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .balance-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .api-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .input-section, .api-section, .results-section {
        padding: 20px;
    }
    
    .modal-content {
        margin: 20% auto;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .balance-display {
        font-size: 1rem;
        padding: 8px 16px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .input-section h2, .api-section h2, .results-section h2 {
        font-size: 1.5rem;
    }
}

/* Success/Error Messages */
.message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.message.success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message i {
    font-size: 1.2rem;
}

/* Copy Success Animation */
.copy-success {
    animation: copySuccess 0.3s ease;
}

@keyframes copySuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Cost Summary */
.cost-summary {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.95) 0%, rgba(74, 0, 0, 0.9) 30%, rgba(45, 0, 0, 0.9) 60%, rgba(0, 0, 0, 0.95) 100%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(220, 20, 60, 0.5);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.cost-summary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(220, 20, 60, 0.2);
    border-color: rgba(220, 20, 60, 0.7);
}

.cost-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.cost-info i {
    color: #dc143c;
    font-size: 1.2rem;
}

.cost-label {
    font-weight: 600;
    color: #ffffff;
    font-size: 1.1rem;
}

.total-cost {
    font-weight: 700;
    color: #ffffff;
    font-size: 1.3rem;
    background: linear-gradient(135deg, #dc143c, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 10px rgba(220, 20, 60, 0.3);
}

.cost-details {
    color: #cccccc;
    font-size: 0.9rem;
    font-weight: 500;
}

.active-generators,
.word-count {
    font-weight: 600;
    color: #ffffff;
}

/* Loading Screen Styles */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-content h3 {
    margin: 20px 0 10px 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.loading-content p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.8;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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