/* ============================================================================
   TWITTERIZER PAGE STYLES
   Styles specific to twitterizer.html
   ============================================================================ */

/* Background */
.twitterizer-bg {
    background-image: url('pics/twitterizer.jpg');
}

/* Tool Container Layout */
.tool-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px;
}

.tool-card {
    background: rgba(15, 25, 40, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    max-width: 700px;
    width: 100%;
    padding: 40px;
}

/* Header */
.tool-header {
    text-align: center;
    margin-bottom: 30px;
}

.tool-header h1 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 42px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 12px;
}

.tool-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

/* API Configuration */
.api-config {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 30px;
}

.api-config summary {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-config summary::-webkit-details-marker {
    display: none;
}

.api-config summary::before {
    content: '▶';
    display: inline-block;
    transition: transform 0.3s ease;
}

.api-config[open] summary::before {
    transform: rotate(90deg);
}

.api-config-content {
    padding-top: 16px;
}

.api-config label {
    display: block;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 8px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.api-config input {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
}

.api-config input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.api-config input:focus {
    outline: none;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.5);
}

.help-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.help-text a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

.help-text a:hover {
    color: #ffffff;
}

/* Input Section */
.input-section {
    margin-bottom: 30px;
}

.input-section label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
}

#tweetInput {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 16px;
    line-height: 1.5;
    resize: vertical;
    font-family: inherit;
}

#tweetInput::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#tweetInput:focus {
    outline: none;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.5);
}

.char-counter {
    text-align: right;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 8px 0 20px;
}

.char-counter.warning {
    color: rgba(255, 200, 100, 0.9);
}

.char-counter.error {
    color: rgba(255, 100, 100, 0.9);
}

/* Button Group - Side by Side Layout */
.button-group {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.button-group button {
    flex: 1;
}

/* Character Warning */
.char-warning {
    background: rgba(255, 200, 100, 0.2);
    border: 1px solid rgba(255, 200, 100, 0.5);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 12px 0;
}

.char-warning p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    margin: 0;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 40px 20px;
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-state p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
}

/* Error State */
.error-state {
    background: rgba(139, 0, 0, 0.5);
    border: 1px solid rgba(255, 100, 100, 0.5);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.error-message {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin-bottom: 16px;
}

/* Results Section */
.results-section {
    margin-top: 30px;
}

.results-section h2 {
    font-size: 20px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
}

.results-output {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 16px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 20px;
}

.results-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.copy-feedback {
    color: rgba(100, 255, 150, 0.9);
    font-size: 14px;
    margin-top: 12px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 480px) {
    .tool-card {
        padding: 30px 20px;
    }

    .tool-header h1 {
        font-size: 32px;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group button {
        width: 100%;
    }

    .results-actions {
        flex-direction: column;
    }

    .results-actions button {
        width: 100%;
    }
}
