/* =====================================================
   COLUMNAR TRANSPOSITION ANALYZER - STYLES
   Matrix Portal Cryptanalysis Tool
   Location: assets/css/columnar-analyzer.css
   ===================================================== */

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

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

.tool-header h1 {
    font-size: 2.5em;
    color: #00ff00;
    margin: 0 0 10px 0;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    font-family: 'Courier New', monospace;
}

.tool-subtitle {
    color: #00cc00;
    font-size: 1.2em;
    margin: 10px 0;
    opacity: 0.9;
}

.tool-badge {
    display: inline-block;
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00ff00;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    color: #00ff00;
    margin-top: 10px;
    letter-spacing: 1px;
}

/* Breadcrumb Navigation */
.breadcrumb {
    margin: 20px 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.6);
    border-left: 3px solid #00ff00;
}

.breadcrumb a {
    color: #00ff00;
    text-decoration: none;
    transition: all 0.3s;
}

.breadcrumb a:hover {
    color: #00ff00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
}

.breadcrumb span {
    color: #00cc00;
}

/* Tool Description */
.tool-description {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #00ff00;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
}

.tool-description h2 {
    color: #00ff00;
    margin-top: 0;
    font-size: 1.8em;
    border-bottom: 2px solid #00ff00;
    padding-bottom: 10px;
}

.tool-description p {
    color: #00cc00;
    line-height: 1.8;
    margin: 15px 0;
}

/* Main Tool Interface */
.tool-interface {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #00ff00;
    border-radius: 10px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

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

.input-section h3 {
    color: #00ff00;
    font-size: 1.4em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#cipher-input {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff00;
    border-radius: 5px;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    resize: vertical;
    box-sizing: border-box;
}

#cipher-input:focus {
    outline: none;
    border-color: #00ff00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.4);
}

#cipher-input::placeholder {
    color: #006600;
}

.input-info {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    margin-top: 10px;
    color: #00cc00;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

/* Options Section */
.options-section {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 50, 0, 0.3);
    border: 1px solid #00aa00;
    border-radius: 8px;
}

.options-section h3 {
    color: #00ff00;
    font-size: 1.3em;
    margin-bottom: 20px;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.option-group label {
    color: #00ff00;
    font-weight: 600;
    min-width: 150px;
}

.option-group input[type="number"] {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00aa00;
    border-radius: 5px;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    width: 100px;
    transition: all 0.3s;
}

.option-group input[type="number"]:focus {
    outline: none;
    border-color: #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.option-help {
    color: #00aa00;
    font-size: 0.85em;
    font-style: italic;
}

.checkbox-group {
    align-items: center;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #00ff00;
}

.checkbox-group input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkbox-group span {
    color: #00cc00;
}

/* Button Group */
.button-group {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.primary-btn,
.secondary-btn {
    padding: 12px 30px;
    font-size: 1em;
    font-weight: 600;
    border: 2px solid;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.primary-btn {
    background: #00ff00;
    color: #000;
    border-color: #00ff00;
}

.primary-btn:hover {
    background: #00cc00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.6);
    transform: translateY(-2px);
}

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

.secondary-btn {
    background: rgba(0, 0, 0, 0.8);
    color: #00ff00;
    border-color: #00ff00;
}

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

/* Progress Container */
#progress-container {
    margin: 30px 0;
    padding: 20px;
    background: rgba(0, 50, 0, 0.3);
    border: 1px solid #00aa00;
    border-radius: 8px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff00;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

#progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff00, #00cc00);
    width: 0%;
    transition: width 0.3s;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.6);
}

#progress-text {
    color: #00ff00;
    text-align: center;
    margin-top: 10px;
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
}

/* Results Container */
#results-container {
    margin-top: 30px;
    padding: 25px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #00ff00;
    border-radius: 10px;
}

#results-container h3 {
    color: #00ff00;
    font-size: 1.6em;
    margin-bottom: 20px;
    text-align: center;
}

#results-summary {
    background: rgba(0, 50, 0, 0.3);
    padding: 15px;
    border: 1px solid #00aa00;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #00cc00;
    font-family: 'Courier New', monospace;
}

#results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-card {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00aa00;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

.result-card:hover {
    border-color: #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    transform: translateX(5px);
}

.result-card.top-result {
    border-color: #00ff00;
    border-width: 3px;
    background: rgba(0, 50, 0, 0.4);
}

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

.result-rank {
    font-size: 1.2em;
    font-weight: 700;
    color: #00ff00;
}

.result-score {
    font-size: 1em;
    color: #00ff00;
    font-family: 'Courier New', monospace;
}

.result-columns {
    font-size: 0.95em;
    color: #00cc00;
    padding: 5px 10px;
    background: rgba(0, 255, 0, 0.1);
    border-radius: 5px;
}

.result-keyword {
    font-size: 0.95em;
    color: #00ff00;
    padding: 5px 10px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid #ffd700;
    border-radius: 5px;
    font-weight: 600;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

.result-text {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #00aa00;
    padding: 15px;
    border-radius: 5px;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    line-height: 1.6;
    word-break: break-word;
    max-height: 200px;
    overflow-y: auto;
}

.result-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.copy-result-btn {
    padding: 8px 16px;
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00ff00;
    color: #00ff00;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    transition: all 0.3s;
}

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

/* Educational Content */
.educational-content {
    margin: 40px 0;
}

.educational-content h2 {
    color: #00ff00;
    font-size: 2em;
    margin-bottom: 25px;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.info-box {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #00aa00;
    border-left: 4px solid #00ff00;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
}

.info-box h3 {
    color: #00ff00;
    font-size: 1.4em;
    margin-bottom: 15px;
}

.info-box p {
    color: #00cc00;
    line-height: 1.8;
    margin: 10px 0;
}

.info-box ul {
    color: #00cc00;
    margin: 15px 0;
    padding-left: 25px;
}

.info-box li {
    margin: 10px 0;
    line-height: 1.6;
}

.example {
    background: rgba(0, 50, 0, 0.3);
    border: 1px solid #00aa00;
    border-radius: 5px;
    padding: 15px;
    margin: 15px 0;
}

.example h4 {
    color: #00ff00;
    margin-bottom: 10px;
}

.example pre {
    color: #00ff00;
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    line-height: 1.6;
}

/* Usage Guide */
.usage-guide {
    margin: 40px 0;
}

.usage-guide h2 {
    color: #00ff00;
    font-size: 2em;
    margin-bottom: 30px;
    text-align: center;
}

.step {
    display: flex;
    gap: 20px;
    margin: 25px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #00aa00;
    border-radius: 8px;
    transition: all 0.3s;
}

.step:hover {
    border-color: #00ff00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
}

.step-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: #00ff00;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: 700;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.6);
}

.step-content h3 {
    color: #00ff00;
    margin-bottom: 10px;
}

.step-content p {
    color: #00cc00;
    line-height: 1.6;
}

/* Tips Section */
.tips-section {
    margin: 40px 0;
}

.tips-section h2 {
    color: #00ff00;
    font-size: 2em;
    margin-bottom: 30px;
    text-align: center;
}

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

.tip-card {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00aa00;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

.tip-card:hover {
    border-color: #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    transform: translateY(-5px);
}

.tip-card h3 {
    color: #00ff00;
    font-size: 1.3em;
    margin-bottom: 15px;
}

.tip-card ul {
    color: #00cc00;
    list-style-type: none;
    padding: 0;
}

.tip-card li {
    margin: 12px 0;
    padding-left: 20px;
    position: relative;
    line-height: 1.6;
}

.tip-card li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #00ff00;
}

.tip-card a {
    color: #00ff00;
    text-decoration: none;
    transition: all 0.3s;
}

.tip-card a:hover {
    color: #00ff00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
}

/* Console Section */
.console-section {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #00ff00;
    border-radius: 10px;
    padding: 25px;
    margin: 30px 0;
}

.console-section h2 {
    color: #00ff00;
    margin-bottom: 15px;
}

.console-section p {
    color: #00cc00;
    margin-bottom: 15px;
}

.command-list {
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border: 1px solid #00aa00;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
}

.command-list code {
    color: #00ff00;
    background: rgba(0, 255, 0, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
}

/* Footer */
.tool-footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
    background: rgba(0, 0, 0, 0.8);
    border-top: 2px solid #00ff00;
    color: #00cc00;
}

.tool-footer p {
    margin: 10px 0;
}

.tool-footer a {
    color: #00ff00;
    text-decoration: none;
    transition: all 0.3s;
}

.tool-footer a:hover {
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
}

.tool-footer code {
    background: rgba(0, 255, 0, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    color: #00ff00;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tool-container {
        padding: 15px;
    }

    .tool-header h1 {
        font-size: 1.8em;
    }

    .tool-subtitle {
        font-size: 1em;
    }

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

    .primary-btn,
    .secondary-btn {
        width: 100%;
    }

    .option-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .option-group label {
        min-width: auto;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .step {
        flex-direction: column;
    }

    .step-number {
        align-self: flex-start;
    }
}

/* Scrollbar Styling */
#cipher-input::-webkit-scrollbar,
.result-text::-webkit-scrollbar {
    width: 10px;
}

#cipher-input::-webkit-scrollbar-track,
.result-text::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
}

#cipher-input::-webkit-scrollbar-thumb,
.result-text::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 5px;
}

#cipher-input::-webkit-scrollbar-thumb:hover,
.result-text::-webkit-scrollbar-thumb:hover {
    background: #00cc00;
}

/* Animation for result cards */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.result-card {
    animation: slideIn 0.3s ease-out;
}