/* Caesar Cipher Tool Styles */
.caesar-cipher-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    color: #333;
}

.caesar-cipher-hero {
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    padding: 40px 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.caesar-cipher-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.caesar-cipher-hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.6;
}

.caesar-cipher-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.caesar-cipher-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

.caesar-cipher-tool {
    display: flex;
    flex-direction: column;
    gap: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 40px;
}

.caesar-cipher-input-section, .caesar-cipher-output-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.caesar-cipher-input-group, .caesar-cipher-output-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.caesar-cipher-label {
    font-weight: 600;
    color: #555;
    font-size: 1rem;
}

.caesar-cipher-textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s;
}

.caesar-cipher-textarea:focus {
    outline: none;
    border-color: #6e8efb;
    box-shadow: 0 0 0 3px rgba(110, 142, 251, 0.2);
}

.caesar-cipher-settings {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.caesar-cipher-shift-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.caesar-cipher-number-input {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    width: 100px;
    transition: border-color 0.3s;
}

.caesar-cipher-number-input:focus {
    outline: none;
    border-color: #6e8efb;
    box-shadow: 0 0 0 3px rgba(110, 142, 251, 0.2);
}

.caesar-cipher-action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.caesar-cipher-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.caesar-cipher-btn-primary {
    background-color: #6e8efb;
    color: white;
}

.caesar-cipher-btn-primary:hover {
    background-color: #5a7df9;
    transform: translateY(-2px);
}

.caesar-cipher-btn-secondary {
    background-color: #a777e3;
    color: white;
}

.caesar-cipher-btn-secondary:hover {
    background-color: #9866df;
    transform: translateY(-2px);
}

.caesar-cipher-btn-clear {
    background-color: #f5f5f5;
    color: #666;
}

.caesar-cipher-btn-clear:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
}

.caesar-cipher-copy-btn {
    padding: 10px 20px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    align-self: flex-end;
    margin-top: 10px;
}

.caesar-cipher-copy-btn:hover {
    background-color: #3d8b40;
    transform: translateY(-2px);
}

.caesar-cipher-info-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.caesar-cipher-info-box {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 4px solid #6e8efb;
}

.caesar-cipher-info-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.caesar-cipher-info-icon {
    width: 50px;
    height: 50px;
    background: rgba(110, 142, 251, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: #6e8efb;
}

.caesar-cipher-info-title {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #444;
}

.caesar-cipher-info-text {
    color: #666;
    line-height: 1.6;
}

.caesar-cipher-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.caesar-cipher-content-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.caesar-cipher-content-card-dark {
    background: #f9f9ff;
    border: 1px solid #e0e0ff;
}

.caesar-cipher-content-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #444;
    position: relative;
    padding-bottom: 10px;
}

.caesar-cipher-content-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, #6e8efb, #a777e3);
    border-radius: 3px;
}

.caesar-cipher-content-text {
    color: #666;
    line-height: 1.7;
    margin-bottom: 15px;
}

.caesar-cipher-content-list {
    padding-left: 20px;
    margin-bottom: 20px;
    color: #666;
    line-height: 1.7;
}

.caesar-cipher-content-list li {
    margin-bottom: 8px;
}

.caesar-cipher-internal-link {
    color: #6e8efb;
    text-decoration: none;
    font-weight: 600;
}

.caesar-cipher-internal-link:hover {
    text-decoration: underline;
}

.caesar-cipher-faq {
    margin-bottom: 40px;
}

.caesar-cipher-faq-title {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: #444;
    text-align: center;
}

.caesar-cipher-faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.caesar-cipher-faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.caesar-cipher-faq-question {
    width: 100%;
    padding: 18px 25px;
    text-align: left;
    background: white;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: #444;
    cursor: pointer;
    transition: background-color 0.3s;
}

.caesar-cipher-faq-question:hover {
    background-color: #f9f9f9;
}

.caesar-cipher-faq-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s;
}

.caesar-cipher-faq-item.active .caesar-cipher-faq-icon {
    transform: rotate(180deg);
}

.caesar-cipher-faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    background: #f9f9f9;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
}

.caesar-cipher-faq-item.active .caesar-cipher-faq-answer {
    padding: 20px 25px;
    max-height: 500px;
}

.caesar-cipher-faq-answer p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 15px;
}

.caesar-cipher-faq-answer ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .caesar-cipher-title {
        font-size: 2rem;
    }
    
    .caesar-cipher-subtitle {
        font-size: 1rem;
    }
    
    .caesar-cipher-tool {
        padding: 20px;
    }
    
    .caesar-cipher-settings {
        flex-direction: column;
        align-items: stretch;
    }
    
    .caesar-cipher-action-buttons {
        justify-content: space-between;
    }
    
    .caesar-cipher-btn {
        flex-grow: 1;
    }
    
    .caesar-cipher-info-boxes {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .caesar-cipher-action-buttons {
        flex-direction: column;
    }
    
    .caesar-cipher-btn {
        width: 100%;
    }
    
    .caesar-cipher-content-card {
        padding: 20px;
    }
    
    .caesar-cipher-faq-question {
        padding: 15px 20px;
        font-size: 1rem;
    }
}



/* Variations Section */
.caesar-cipher-variations {
    margin: 60px 0;
}

.caesar-cipher-section-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 40px;
    color: #444;
    position: relative;
}

.caesar-cipher-section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, #6e8efb, #a777e3);
    border-radius: 2px;
}

.caesar-cipher-variations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.caesar-cipher-variation-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 4px solid #a777e3;
}

.caesar-cipher-variation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.caesar-cipher-variation-icon {
    width: 60px;
    height: 60px;
    background: rgba(167, 119, 227, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: #a777e3;
}

.caesar-cipher-variation-icon svg {
    width: 30px;
    height: 30px;
}

.caesar-cipher-variation-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #444;
}

.caesar-cipher-variation-text {
    color: #666;
    line-height: 1.7;
    margin-bottom: 20px;
}

.caesar-cipher-variation-link {
    display: inline-flex;
    align-items: center;
    color: #6e8efb;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.caesar-cipher-variation-link:hover {
    color: #5a7df9;
    text-decoration: underline;
}

.caesar-cipher-variation-link::after {
    content: '→';
    margin-left: 5px;
    transition: transform 0.3s;
}

.caesar-cipher-variation-link:hover::after {
    transform: translateX(3px);
}

/* Exercises Section */
.caesar-cipher-exercises {
    margin: 60px 0;
    background: #f9f9ff;
    padding: 50px 20px;
    border-radius: 12px;
    border: 1px solid #e0e0ff;
}

.caesar-cipher-exercise-container {
    max-width: 900px;
    margin: 0 auto;
}

.caesar-cipher-exercise {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.caesar-cipher-exercise:last-child {
    margin-bottom: 0;
}

.caesar-cipher-exercise-title {
    font-size: 1.4rem;
    color: #444;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.caesar-cipher-exercise-text {
    color: #666;
    line-height: 1.7;
    margin-bottom: 15px;
}

.caesar-cipher-exercise-box {
    background: #f5f5ff;
    border-left: 4px solid #6e8efb;
    padding: 15px;
    margin: 15px 0;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 600;
    color: #444;
}

.caesar-cipher-exercise-steps {
    padding-left: 20px;
    color: #666;
    line-height: 1.7;
}

.caesar-cipher-exercise-steps li {
    margin-bottom: 10px;
}

.caesar-cipher-exercise-hint {
    font-style: italic;
    color: #888;
    margin: 10px 0;
}

.caesar-cipher-exercise-solution-btn {
    background: #6e8efb;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

.caesar-cipher-exercise-solution-btn:hover {
    background: #5a7df9;
}

.caesar-cipher-exercise-solution {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.5s ease;
    background: #f9f9f9;
    border-radius: 6px;
    margin-top: 10px;
}

.caesar-cipher-exercise-solution.show {
    max-height: 200px;
    padding: 15px;
    margin-top: 15px;
}

/* Applications Section */
.caesar-cipher-applications {
    margin: 60px 0;
}

.caesar-cipher-applications-content {
    max-width: 1000px;
    margin: 0 auto;
}

.caesar-cipher-application-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.caesar-cipher-application-card-dark {
    background: #444;
}

.caesar-cipher-application-card-dark .caesar-cipher-application-title,
.caesar-cipher-application-card-dark .caesar-cipher-application-text,
.caesar-cipher-application-card-dark .caesar-cipher-application-list li {
    color: white;
}

.caesar-cipher-application-title {
    font-size: 1.4rem;
    color: #444;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.caesar-cipher-application-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, #6e8efb, #a777e3);
    border-radius: 3px;
}

.caesar-cipher-application-text {
    color: #666;
    line-height: 1.7;
    margin-bottom: 20px;
}

.caesar-cipher-application-list {
    padding-left: 20px;
    color: #666;
    line-height: 1.7;
}

.caesar-cipher-application-list li {
    margin-bottom: 10px;
}

.caesar-cipher-application-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.caesar-cipher-application-comparison-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
}

.caesar-cipher-application-comparison-item h4 {
    color: #6e8efb;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.caesar-cipher-application-comparison-item p {
    color: #eee;
    line-height: 1.6;
    font-size: 0.95rem;
}

.caesar-cipher-application-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.caesar-cipher-application-example {
    background: #f5f5ff;
    padding: 15px;
    border-radius: 8px;
}

.caesar-cipher-application-example h4 {
    color: #6e8efb;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.caesar-cipher-application-example p {
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}

.caesar-cipher-application-note {
    font-style: italic;
    color: #888;
    margin-top: 20px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .caesar-cipher-variations-grid,
    .caesar-cipher-application-comparison,
    .caesar-cipher-application-examples {
        grid-template-columns: 1fr;
    }
    
    .caesar-cipher-exercises {
        padding: 30px 15px;
    }
    
    .caesar-cipher-application-card {
        padding: 20px;
    }
}