/**
 * Caesar Cipher Tool Styles
 * Complete version with educational sections
 * NO INLINE STYLES - CSP Compliant
 */

/* Tool Container */
.tool-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 20px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #0ff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.tool-header h1 {
    color: #0ff;
    font-size: 2.5em;
    margin: 0 0 10px 0;
    text-shadow: 0 0 10px #0ff;
}

.subtitle {
    color: #0f0;
    font-size: 1.1em;
    margin: 0;
}

/* Breadcrumb */
.breadcrumb {
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.breadcrumb a {
    color: #0ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #0f0;
    text-shadow: 0 0 5px #0f0;
}

.breadcrumb span {
    color: #0f0;
}

/* Tool Box */
.tool-box {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #0ff;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
}

/* Mode Toggle */
.mode-toggle {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.mode-btn {
    padding: 15px 40px;
    background: rgba(0, 255, 255, 0.05);
    border: 2px solid #0ff;
    border-radius: 5px;
    color: #0ff;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn:hover {
    background: rgba(0, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
    transform: translateY(-2px);
}

.mode-btn.active {
    background: rgba(0, 255, 255, 0.25);
    border-color: #fff;
    color: #fff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
}

/* Input/Output Groups */
.input-group,
.output-group {
    margin-bottom: 25px;
}

.input-group label,
.output-group label {
    display: block;
    color: #0ff;
    font-size: 1em;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-group textarea,
.output-group textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #0f0;
    border-radius: 5px;
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    resize: vertical;
    transition: all 0.3s ease;
}

.input-group textarea:focus,
.output-group textarea:focus {
    outline: none;
    border-color: #0ff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

/* Shift Control */
.shift-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.shift-btn {
    padding: 15px 25px;
    background: rgba(0, 255, 0, 0.1);
    border: 2px solid #0f0;
    border-radius: 5px;
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shift-btn:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.4);
    transform: scale(1.05);
}

.shift-btn:active {
    transform: scale(0.95);
}

.shift-display-box {
    text-align: center;
    padding: 20px 40px;
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid #0ff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.shift-label {
    color: #0ff;
    font-size: 0.9em;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.shift-value {
    color: #fff;
    font-size: 3em;
    font-weight: bold;
    text-shadow: 0 0 15px #0ff;
}

/* Slider */
input[type="range"] {
    width: 100%;
    margin: 20px 0;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: rgba(0, 255, 255, 0.2);
    border-radius: 5px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    background: #0ff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px #0ff;
    transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 20px #0ff;
}

input[type="range"]::-moz-range-thumb {
    width: 25px;
    height: 25px;
    background: #0ff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px #0ff;
}

/* Quick Shift Buttons */
.quick-shifts {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

.quick-shifts label {
    color: #0f0;
    margin-right: 10px;
}

.quick-btn {
    padding: 10px 20px;
    background: rgba(0, 255, 0, 0.1);
    border: 2px solid #0f0;
    border-radius: 5px;
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-btn:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    transform: translateY(-2px);
}

/* Copy Button */
.copy-btn {
    margin-top: 10px;
    padding: 10px 20px;
    background: rgba(0, 255, 0, 0.1);
    border: 2px solid #0f0;
    border-radius: 5px;
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.4);
}

/* All Results Display */
.all-results {
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #0f0;
    border-radius: 10px;
}

.all-results h3 {
    color: #0f0;
    margin-bottom: 15px;
    text-align: center;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.result-item {
    padding: 10px;
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid #0f0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.result-item:hover {
    background: rgba(0, 255, 0, 0.15);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.result-shift {
    color: #0ff;
    font-weight: bold;
    margin-bottom: 5px;
}

.result-text {
    color: #0f0;
    font-size: 0.9em;
    word-break: break-all;
}

/* ============================================
   EDUCATIONAL SECTIONS
   ============================================ */

/* Info Section */
.info-section {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #0f0;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
}

.info-section h2 {
    color: #0ff;
    font-size: 2em;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #0ff;
    border-bottom: 2px solid #0f0;
    padding-bottom: 10px;
}

.info-section h3 {
    color: #0f0;
    font-size: 1.5em;
    margin: 25px 0 15px 0;
    text-shadow: 0 0 5px #0f0;
}

.info-section p {
    color: #0f0;
    line-height: 1.8;
    margin-bottom: 15px;
}

.info-section strong {
    color: #0ff;
}

.info-section ol,
.info-section ul {
    color: #0f0;
    margin-left: 25px;
    margin-bottom: 15px;
}

.info-section li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Example Box */
.example-box {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #0ff;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.example-box p {
    color: #0f0;
    margin-bottom: 10px;
}

.example-box code {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #0f0;
    padding: 5px 10px;
    border-radius: 3px;
    color: #0ff;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

/* Related Tools Section */
.related-tools {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #0ff;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.related-tools h2 {
    color: #0ff;
    font-size: 2em;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #0ff;
    text-align: center;
}

.tool-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.tool-link-card {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #0f0;
    border-radius: 8px;
    padding: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.tool-link-card:hover {
    background: rgba(0, 255, 0, 0.1);
    border-color: #0ff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    transform: translateY(-5px);
}

.tool-link-card h3 {
    color: #0ff;
    font-size: 1.3em;
    margin-bottom: 10px;
    text-shadow: 0 0 5px #0ff;
}

.tool-link-card p {
    color: #0f0;
    line-height: 1.6;
    margin: 0;
}

/* Tool Footer */
.tool-footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
}

.back-link {
    display: inline-block;
    padding: 15px 30px;
    background: rgba(0, 255, 0, 0.1);
    border: 2px solid #0f0;
    border-radius: 5px;
    color: #0f0;
    text-decoration: none;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    transition: all 0.3s ease;
}

.back-link:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.4);
    transform: translateY(-2px);
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .tool-container {
        padding: 15px;
    }
    
    .tool-header h1 {
        font-size: 2em;
    }
    
    .tool-box {
        padding: 20px;
    }
    
    .mode-toggle {
        flex-direction: column;
        gap: 10px;
    }
    
    .mode-btn {
        width: 100%;
        padding: 12px;
    }
    
    .shift-control {
        flex-direction: column;
        gap: 15px;
    }
    
    .shift-display-box {
        width: 100%;
    }
    
    .quick-shifts {
        flex-direction: column;
        align-items: stretch;
    }
    
    .quick-btn {
        width: 100%;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .info-section {
        padding: 20px;
    }
    
    .info-section h2 {
        font-size: 1.5em;
    }
    
    .info-section h3 {
        font-size: 1.2em;
    }
    
    .tool-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .tool-header {
        padding: 20px 15px;
    }
    
    .tool-header h1 {
        font-size: 1.5em;
    }
    
    .subtitle {
        font-size: 0.9em;
    }
    
    .tool-box {
        padding: 15px;
    }
    
    .shift-value {
        font-size: 2.5em;
    }
    
    .info-section {
        padding: 15px;
    }
    
    .example-box {
        padding: 15px;
    }
    
    .related-tools {
        padding: 20px;
    }
}