:root {
    --primary-color: #4a90e2;
    --danger-color: #e74c3c;
    --background-color: #f5f6fa;
    --card-background: #ffffff;
    --text-color: #2c3e50;
    --border-color: #e1e1e1;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto Light', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, sans-serif;
    font-weight: 300;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 300;
    margin-bottom: 0.5em;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header-controls {
    display: flex;
    gap: 10px;
}

/* Button styles */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn.danger {
    color: var(--text-color);
    opacity: 0.7;
}

.btn.danger:hover {
    opacity: 1;
}

.btn.icon-btn {
    padding: 8px;
    background: none;
    color: var(--text-color);
    opacity: 0.7;
}

.btn.icon-btn:hover {
    opacity: 1;
}

.btn.icon-btn i {
    font-size: 1.2em;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--card-background);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.stat-card h3 {
    margin-bottom: 15px;
    color: var(--text-color);
    font-weight: 300;
}

.stat-value {
    font-size: 32px;
    font-weight: 300;
    color: var(--primary-color);
    text-align: center;
    margin-top: 10px;
}

.total-cost {
    font-size: 32px;
    font-weight: 300;
    color: var(--primary-color);
    margin-top: 10px;
    text-align: center;
}

.cost-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.toggle-label {
    font-size: 14px;
    color: var(--text-color);
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

.subscriptions-list {
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 20px;
}

.subscription-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.subscription-item:last-child {
    border-bottom: none;
}

.subscription-info {
    flex-grow: 1;
}

.subscription-info h3 {
    margin-bottom: 5px;
    color: var(--text-color);
    font-weight: 300;
}

.subscription-info p {
    margin: 0;
    color: var(--text-color);
    opacity: 0.8;
}

.subscription-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.delete-btn {
    background: none !important;
    border: none;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s ease;
    color: var(--text-color);
    opacity: 0.7;
}

.delete-btn i {
    font-size: 1.2em;
}

.delete-btn:hover {
    transform: scale(1.1);
    opacity: 1;
}

.edit-btn {
    background: var(--primary-color);
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    padding: 5px 10px;
}

.cancellation-date {
    font-size: 0.9em;
    color: var(--text-color);
    opacity: 0.7;
    margin-top: 5px !important;
}

.slide-in {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background-color: var(--card-background);
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.slide-in.active {
    right: 0;
}

.slide-in-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.slide-in form {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
    font-weight: 300;
}

input[type="date"] {
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    width: 100%;
}

.form-actions {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
}

.form-actions .btn {
    font-size: 18px;
    padding: 12px 30px;
}

#submitButton {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 300;
}

#submitButton:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: none;
    z-index: 999;
}

.overlay.active {
    display: block;
}

.settings-content {
    padding: 20px;
}

.settings-content button {
    display: block;
    width: 100%;
    margin: 10px 0;
}

@media (max-width: 768px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .slide-in {
        max-width: 100%;
    }
}
