/* Alice Calculator WordPress Plugin Styles */

.alice-calc-container {
    max-width: 500px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a1a;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Header Styles */
.alice-calc-header {
    text-align: center;
    margin-bottom: 20px;
}

.alice-calc-title {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
    line-height: 1.2;
}

.alice-calc-red {
    color: #ff4444;
}

.alice-calc-white {
    color: #ffffff;
}

.alice-calc-subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    margin: 5px 0 0 0;
}

/* Calculator Main Container */
.alice-calc-main {
    background: #1a1a1a;
    border: 2px solid #555;
    border-radius: 10px;
    padding: 15px;
}

/* Display Styles */
.alice-calc-display {
    background: #333;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    min-height: 60px;
    text-align: right;
}

.alice-calc-previous {
    color: #888;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    min-height: 20px;
}

.alice-calc-current {
    color: #ffeb3b;
    font-size: 2rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Button Grid */
.alice-calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

/* Button Base Styles */
.alice-calc-btn {
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 15px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alice-calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

/* Button Variants */
.alice-calc-number {
    background: #ffeb3b;
    color: #000;
}

.alice-calc-number:hover {
    background: #fff176;
}

.alice-calc-operator {
    background: #666;
    color: #fff;
}

.alice-calc-operator:hover {
    background: #777;
}

.alice-calc-special {
    background: #888;
    color: #fff;
}

.alice-calc-special:hover {
    background: #999;
}

.alice-calc-function {
    background: #4caf50;
    color: #fff;
}

.alice-calc-function:hover {
    background: #66bb6a;
}

/* Wide buttons */
.alice-calc-wide {
    grid-column: span 2;
}

/* Solution Display */
.alice-calc-solution {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.alice-calc-solution-header {
    background: #333;
    color: #fff;
    padding: 15px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alice-calc-solution-content {
    background: #fff;
    padding: 20px;
    border-radius: 0 0 8px 8px;
    max-width: 600px;
    margin: 0 auto;
}

/* Vertical Calculation Display */
.alice-calc-vertical {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.alice-calc-vertical-header {
    background: #000;
    color: #fff;
    padding: 15px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.alice-calc-expression {
    background: #555;
    color: #ffeb3b;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    text-align: right;
    max-width: 800px;
    margin: 0 auto;
}

.alice-calc-vertical-content {
    background: #333;
    padding: 30px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.alice-calc-operation-name {
    background: #000;
    color: #fff;
    padding: 15px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 0 0 8px 8px;
    max-width: 800px;
    margin: 0 auto;
}

/* Prime Factorization Styles */
.alice-calc-prime-display {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

.alice-calc-prime-left,
.alice-calc-prime-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.alice-calc-prime-number {
    font-size: 3rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.alice-calc-prime-green {
    color: #4caf50;
}

.alice-calc-prime-blue {
    color: #2196f3;
}

.alice-calc-prime-divider {
    width: 2px;
    background: #fff;
    min-height: 200px;
}

/* History Display */
.alice-calc-history {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.alice-calc-history-header {
    background: #333;
    color: #fff;
    padding: 15px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.alice-calc-history-content {
    background: #fff;
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
    min-height: 200px;
}

.alice-calc-clear-history {
    background: #f44336;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 0 0 8px 8px;
    cursor: pointer;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    display: block;
}

.alice-calc-clear-history:hover {
    background: #d32f2f;
}

/* Close Button */
.alice-calc-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
}

.alice-calc-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 600px) {
    .alice-calc-container {
        margin: 10px;
        padding: 15px;
    }
    
    .alice-calc-title {
        font-size: 1.5rem;
    }
    
    .alice-calc-subtitle {
        font-size: 1rem;
    }
    
    .alice-calc-current {
        font-size: 1.5rem;
    }
    
    .alice-calc-btn {
        font-size: 1rem;
        padding: 12px 6px;
        min-height: 45px;
    }
    
    .alice-calc-prime-number {
        font-size: 2rem;
    }
}