/* Page decorations */
.tool-container {
    position: relative;
    overflow: hidden;
}

.grass-block-decoration {
    position: absolute;
    top: 20px;
    left: -20px;
    width: 80px;
    height: 80px;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAA7klEQVRYhe2XMQ7CMAxFXzN0YekROAE34QQMnIuJiYGJgYmJlSNwBA7AAVjKgFo1VdM4aZGKJUt/cPLlO3acCPwTCnAFHsAZGAKhxvlb4r9KAAfDHKAHzIE18AC2wBiIFP4VMAdK4A7MgF7dgnGvp2QsExjV+KcGO7XBNW8JXNJkAuwa5qwU/0yYQA6cFH8T0uCo+JtQvucmToWCEeBXwSiQyVwmqlEQ41bB1fX8Vi2ZMQp6zv2XgnwPHQWZo6DG5Ypw9/xKyecK9kmDRiiZr9LEDzKRKbiSuVsXvO1kpKyC02ve+gqWoODzf+CvPAFUVvdRnE1w7QAAAABJRU5ErkJggg==');
    background-size: cover;
    transform: rotate(-15deg);
    opacity: 0.8;
    z-index: 0;
    image-rendering: pixelated;
    display: none; /* 在大屏幕上才显示 */
}

.nether-portal-decoration {
    position: absolute;
    bottom: 30px;
    right: -15px;
    width: 70px;
    height: 70px;
    background: linear-gradient(45deg, #8B00FF, #4B0082, #8B00FF);
    border: 2px solid #2F1B69;
    transform: rotate(10deg);
    opacity: 0.8;
    z-index: 0;
    display: none; /* 在大屏幕上才显示 */
    animation: portal-glow 2s ease-in-out infinite alternate;
}

@keyframes portal-glow {
    from {
        box-shadow: 0 0 10px #8B00FF;
    }
    to {
        box-shadow: 0 0 20px #8B00FF, 0 0 30px #4B0082;
    }
}

/* Calculator Container */
.calculator-container {
    position: relative;
    background: var(--minecraft-panel);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    z-index: 1;
    border-radius: 2px;
}

.calculator-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAEklEQVQImWNgYGD4z8DAwMAAADgDAKdD8tMAAAAASUVORK5CYII=');
    background-size: 2px 2px;
    opacity: 0.05;
    z-index: -1;
}

.calculator-container h2 {
    color: var(--minecraft-green);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--minecraft-secondary);
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
    text-align: center;
}

/* Conversion Sections */
.conversion-section {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--minecraft-secondary);
    border-radius: 4px;
    position: relative;
}

.overworld-section {
    border-left: 4px solid #4CAF50;
}

.nether-section {
    border-left: 4px solid #FF6B35;
}

.conversion-section h3 {
    color: #E0E0E0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.coordinate-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
}

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

.input-group label {
    font-weight: bold;
    color: #E0E0E0;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.input-group input {
    padding: 0.75rem;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--minecraft-secondary);
    color: white;
    font-family: 'Noto Sans Mono', monospace;
    border-radius: 2px;
    font-size: 1rem;
}

.input-group input:focus {
    outline: none;
    border-color: var(--minecraft-green);
    box-shadow: 0 0 0 2px rgba(68, 189, 50, 0.2);
}

.convert-btn {
    height: fit-content;
    padding: 0.75rem 1.5rem;
    white-space: nowrap;
}

/* Result Display */
.result-display {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border: 1px solid var(--minecraft-secondary);
    border-radius: 2px;
    margin-top: 1rem;
}

.result-display h4 {
    color: var(--minecraft-green);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.coordinate-result {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    font-family: 'Noto Sans Mono', monospace;
    font-size: 1.1rem;
}

.coord-label {
    color: #AAAAAA;
    font-weight: bold;
}

.coordinate-result span:not(.coord-label) {
    color: var(--minecraft-green);
    font-weight: bold;
    min-width: 60px;
}

.copy-btn {
    background: var(--minecraft-secondary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 2px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.copy-btn:hover {
    background: #5A5A5A;
}

/* Info Section */
.info-section {
    background: var(--minecraft-panel);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    position: relative;
    z-index: 1;
    border-radius: 2px;
}

.info-section h2 {
    color: var(--minecraft-green);
    margin-bottom: 1.5rem;
    text-align: center;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

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

.info-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border: 1px solid var(--minecraft-secondary);
    border-radius: 4px;
}

.info-card h3 {
    color: #E0E0E0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.info-card p {
    color: #AAAAAA;
    margin-bottom: 1rem;
    line-height: 1.5;
}

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

.info-card li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.formula {
    background: rgba(68, 189, 50, 0.1);
    padding: 1rem;
    border-left: 4px solid var(--minecraft-green);
    border-radius: 2px;
    font-family: 'Noto Sans Mono', monospace;
    color: #E0E0E0;
}

.formula strong {
    color: var(--minecraft-green);
}

/* Tips Section */
.tips-section {
    background: var(--minecraft-panel);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    position: relative;
    z-index: 1;
    border-radius: 2px;
}

.tips-section h2 {
    color: var(--minecraft-green);
    margin-bottom: 1.5rem;
    text-align: center;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

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

.tip-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border: 1px solid var(--minecraft-secondary);
    border-radius: 4px;
    text-align: center;
}

.tip-card h3 {
    color: #E0E0E0;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.tip-card p {
    color: #AAAAAA;
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Examples Section */
.examples-section {
    background: var(--minecraft-panel);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    position: relative;
    z-index: 1;
    border-radius: 2px;
}

.examples-section h2 {
    color: var(--minecraft-green);
    margin-bottom: 1.5rem;
    text-align: center;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.examples-table {
    overflow-x: auto;
}

.examples-table table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--minecraft-secondary);
}

.examples-table th,
.examples-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--minecraft-secondary);
    font-family: 'Noto Sans Mono', monospace;
}

.examples-table th {
    background: rgba(68, 189, 50, 0.2);
    color: var(--minecraft-green);
    font-weight: bold;
}

.examples-table td {
    color: #E0E0E0;
}

.examples-table tr:hover {
    background: rgba(68, 189, 50, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .coordinate-inputs {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .convert-btn {
        width: 100%;
    }
    
    .coordinate-result {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .info-grid,
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .examples-table {
        font-size: 0.8rem;
    }
    
    .examples-table th,
    .examples-table td {
        padding: 0.5rem;
    }
}

@media (min-width: 1200px) {
    .grass-block-decoration,
    .nether-portal-decoration {
        display: block;
    }
}

/* Success Animation */
@keyframes success-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.result-display.show-result {
    animation: success-pulse 0.3s ease-in-out;
}

/* Copy Success Feedback */
.copy-btn.copied {
    background: var(--minecraft-green) !important;
    color: white;
}

.copy-btn.copied::after {
    content: ' ✓';
}