* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


.matrix-container {
    max-width: 500px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    /*background-color: #f5f5f5;*/
    /*padding: 20px;*/
}

.widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.calculator {
    background: white;
    padding: 30px 40px 40px 40px;
    border-radius: 17px;
}

/*h1 {*/
/*    text-align: center;*/
/*    font-size: 28px;*/
/*    margin-bottom: 30px;*/
/*    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
/*    -webkit-background-clip: text;*/
/*    -webkit-text-fill-color: transparent;*/
/*    font-weight: bold;*/
/*}*/

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

input[type="text"] {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 18px;
    transition: all 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.date-group {
    display: grid;
    grid-template-columns: 1fr 2fr 1.2fr;
    gap: 10px;
}

select {
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 18px;
    background: white;
    cursor: pointer;
    color: #333;
    height: 56px;
    text-align: center;
    text-align-last: center;
    -moz-text-align-last: center;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
    padding-right: 45px;
    transition: all 0.3s;
}

select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.results {
    display: none;
    margin-top: 30px;
}

.results h2 {
    text-align: center;
    /*color: #333;*/
    margin-top: 20px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;

}

.result-item {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.2s;
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.result-item h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 18px;
}

.result-item p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.btn-secondary {
    background: #2196F3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
    display: block;
    margin: auto;
}

.btn-secondary:hover {
    background: #1976D2;
}

.btn-reset {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #FF6B6B 0%, #C44569 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.3);
}

.matrix-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
}

.matrix-modal-content {
    background: white;
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
    border-radius: 10px;
    max-height: 80vh;
    overflow-y: auto;
}

.matrix-modal-content h2 {
    color: #333;
    margin-bottom: 20px;
}

.matrix-modal-content p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
}

.btn-close {
    background: #f44336;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-close:hover {
    background: #d32f2f;
}

@media (max-width: 600px) {
    .date-group {
        grid-template-columns: 1fr;
    }

    .calculator {
        padding: 20px;
    }
}