/**
 * Case Converter CSS
 * Modern, responsive design for text case conversion tool
 */

/* Main Container */
.case-converter-tool {
    min-height: 100vh;
    background: white;
    padding: 2rem 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tool-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
.tool-header {
    text-align: center;
    margin-bottom: 3rem;
    color: #2d3748;
}

.tool-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tool-header h1 i {
    margin-right: 1rem;
    color: #ffd700;
}

.tool-description {
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.95;
}

/* Converter Interface */
.converter-interface {
    margin-bottom: 3rem;
}

.converter-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    
    backdrop-filter: blur(10px);
}

/* Input Section */
.input-section {
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-label i {
    color: #667eea;
}

.input-container {
    position: relative;
    display: flex;
    align-items: stretch;
}

.input-field {
    flex: 1;
    padding: 1rem 4rem 1rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 250px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.input-field:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-actions {
    position: absolute;
    right: 0.5rem;
    top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.action-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: #edf2f7;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: #e2e8f0;
    color: #2d3748;
    transform: scale(1.05);
}

.input-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #718096;
}

.input-status-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Options Section */
.options-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f7fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.options-section h4 {
    margin: 0 0 1rem 0;
    color: #2d3748;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.options-section h4 i {
    color: #667eea;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.option-item:hover {
    background: #edf2f7;
}

.option-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.option-label {
    font-weight: 500;
    color: #4a5568;
}

/* Convert Button */
.convert-section {
    margin-bottom: 2rem;
    text-align: center;
}

.convert-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 200px;
    justify-content: center;
}

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

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

/* Error Message */
.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #feb2b2;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 2rem;
    color: #4a5568;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Results Section */
.result-section {
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.result-section.show {
    opacity: 1;
    transform: translateY(0);
}

.result-header {
    margin-bottom: 1.5rem;
}

.result-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Case Formats Grid */
.case-formats-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.case-format-item {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.case-format-item:hover {
    border-color: #cbd5e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.case-format-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.case-format-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 1.1rem;
}

.case-format-header > div {
    flex: 1;
}

.copy-case-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-case-btn:hover {
    background: #5a67d8;
    transform: scale(1.05);
}

.case-format-result {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: #2d3748;
    word-break: break-all;
    min-height: 50px;
    display: flex;
    align-items: center;
}

/* Steps Section */
.steps-section {
    background: #f7fafc;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.steps-section h4 {
    margin: 0 0 1rem 0;
    color: #2d3748;
    font-size: 1.2rem;
}

.steps-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.step-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.step-number {
    font-weight: 600;
    color: #667eea;
    min-width: 80px;
}

.step-description {
    color: #4a5568;
    flex: 1;
}

/* Examples Section */
.examples-section {
    margin-bottom: 3rem;
}

.examples-section h3 {
    margin: 0 0 1.5rem 0;
    color: #2d3748;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.examples-section h3 i {
    color: #667eea;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.example-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.example-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.example-input {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.example-output {
    font-family: 'Courier New', monospace;
    background: #e6fffa;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid #b2f5ea;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9rem;
}

/* Info Section */
.info-section {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.info-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    
    border: 1px solid #e2e8f0;
}

.info-card h3 {
    margin: 0 0 1.5rem 0;
    color: #2d3748;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.info-card h3 i {
    color: #667eea;
    font-size: 1.2rem;
}

.info-card h4 {
    margin: 1.5rem 0 1rem 0;
    color: #2d3748;
    font-size: 1.1rem;
}

.info-card p {
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 1rem;
}

.info-card ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.info-card li {
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.language-conventions {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.language-item {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    color: #4a5568;
}

/* Related Tools Section */
.related-tools-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.related-tools-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.related-tools-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.related-tools-header h3 i {
    color: #667eea;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.related-tool-link {
    background: #f8fafc;
    color: #667eea;
    text-decoration: none;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    border: 1px solid #e5e7eb;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.related-tool-link:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.related-tool-link i {
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .case-converter-tool {
        padding: 0.5rem 0.5rem;
    }

    .tool-header h1 {
        font-size: 2.2rem;
    }

    .tool-description {
        font-size: 1rem;
    }

    .converter-card {
        padding: 1rem;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .case-formats-grid {
        grid-template-columns: 1fr;
    }

    .examples-grid {
        grid-template-columns: 1fr;
    }

    .related-tools-section {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }

    .related-tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .related-tool-link {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
        flex-direction: column;
        gap: 0.25rem;
    }

    .input-field {
        padding-right: 3rem;
        min-height: 200px;
    }

    .input-actions {
        flex-direction: column;
        gap: 0.25rem;
    }

    .action-btn {
        width: 32px;
        height: 32px;
    }

    .case-format-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .copy-case-btn {
        align-self: stretch;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .tool-header h1 {
        font-size: 1.8rem;
    }

    .converter-card {
        padding: 0rem;
    }

    .input-field {
        min-height: 300px;
        font-size: 0.9rem;
    }

    .convert-btn {
        width: 100%;
        max-width: 300px;
    }

    .case-format-item {
        padding: 1rem;
    }

    .case-format-result {
        font-size: 0.875rem;
        min-height: 40px;
    }
}
