/* e:\xmnew\aaa_Enigma\style.css */
:root {
    --enigma-dark: #1c201d;
    --bombe-dark: #151a2a;
    --metal-gold: #c5a963;
    --metal-border: #444;
    --text-main: #e0e0e0;
    --btn-hover: #555;
}

body {
    margin: 0;
    padding: 0;
    background: radial-gradient(circle at center, #2c322d 0%, #0d100e 100%);
    color: var(--text-main);
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    body {
        align-items: flex-start;
        padding-top: 40px;
        padding-bottom: 60px;
        overflow-y: auto;
    }
}

.bg-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('Enigma/images/铁十字.png') left 10% center no-repeat,
                url('Bombe/images/英国国旗.png') right 10% center no-repeat;
    background-size: 400px, 400px;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

@media (max-width: 768px) {
    .bg-overlay {
        background-size: 200px, 200px;
        background-position: left 5% top 10%, right 5% bottom 10%;
        position: absolute;
    }
    
    .main-title {
        font-size: 32px;
        letter-spacing: 4px;
    }
    
    .sub-title {
        font-size: 12px;
        letter-spacing: 2px;
    }
    
    .cards-container {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .machine-card {
        width: 90%;
        max-width: 350px;
        padding: 20px;
    }
    
    .card-logo {
        width: 80px;
        height: 80px;
    }
    
    .machine-card h2 {
        font-size: 20px;
    }
    
    .machine-card p {
        font-size: 13px;
        height: auto;
        margin-bottom: 20px;
    }
    
    .modal-content {
        width: 90%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .modal-content h2 {
        font-size: 20px;
    }
}

.main-container {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 1000px;
    width: 90%;
}

.main-title {
    font-size: 48px;
    color: var(--metal-gold);
    letter-spacing: 8px;
    margin-bottom: 5px;
    text-shadow: 2px 2px 5px #000;
}

.sub-title {
    font-size: 16px;
    color: #888;
    letter-spacing: 4px;
    margin-top: 0;
    margin-bottom: 50px;
}

.cards-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.machine-card {
    background: linear-gradient(145deg, #2a2a2a, #111);
    border: 3px solid var(--metal-border);
    border-radius: 10px;
    padding: 30px;
    width: 350px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.8), inset 0 0 15px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.machine-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.9), inset 0 0 20px rgba(255,255,255,0.05);
}

.card-logo {
    width: 120px;
    height: 120px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-bottom: 20px;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.8));
    opacity: 0.8;
}

.enigma-logo {
    background-image: url('Enigma/images/铁十字.png');
}

.bombe-logo {
    background-image: url('Bombe/images/英国国旗.png');
    border-radius: 50%;
}

.machine-card h2 {
    color: var(--metal-gold);
    margin: 10px 0;
    font-size: 24px;
    text-shadow: 1px 1px 3px #000;
}

.machine-card p {
    color: #aaa;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 30px;
    height: 40px;
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.action-btn {
    padding: 12px 20px;
    border: 2px solid var(--metal-border);
    border-radius: 5px;
    font-family: inherit;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.5);
    display: block;
    text-align: center;
}

.start-btn {
    background: linear-gradient(to bottom, #8b0000, #4a0000);
    border-color: #ff4500;
}

.start-btn:hover {
    background: linear-gradient(to bottom, #a00000, #600000);
}

.bombe-card .start-btn {
    background: linear-gradient(to bottom, #1e3a8a, #00004a);
    border-color: #00bfff;
}

.bombe-card .start-btn:hover {
    background: linear-gradient(to bottom, #274b9f, #000066);
}

.info-btn {
    background: linear-gradient(to bottom, #444, #222);
}

.info-btn:hover {
    background: linear-gradient(to bottom, #555, #333);
}

.action-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* 模态框样式 */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.8); 
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #2b302c 0%, #151816 100%);
    margin: 5% auto;
    padding: 30px;
    border: 3px solid var(--metal-gold);
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.9), inset 0 0 20px rgba(0,0,0,0.8);
    position: relative;
    color: var(--text-main);
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.modal-content h2 {
    color: var(--metal-gold);
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    margin-top: 0;
}

.modal-body h3 {
    color: #fff;
    margin-top: 25px;
}

.modal-body p, .modal-body li {
    line-height: 1.6;
    color: #ccc;
}

.example-box {
    background-color: #111;
    border-left: 4px solid var(--metal-gold);
    padding: 15px;
    margin-top: 15px;
    border-radius: 0 4px 4px 0;
}

.example-box p {
    margin: 5px 0;
    font-family: 'Courier New', Courier, monospace;
}

.footer-credit {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    color: #888;
    font-size: 14px;
    text-shadow: 1px 1px 2px #000;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .footer-credit {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: 40px;
        padding-bottom: 20px;
        font-size: 12px;
    }
}