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

#write-or-die-app {
    font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    min-height: 100vh;
    padding: 20px;
}

.wod-container {
    max-width: 1200px;
    margin: 0 auto;
}

.wod-setup-screen, .wod-writing-screen {
    background: white;
    border-radius: 12px;
    padding: 56px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    position: relative;
}

/* Elegant home button */
.wod-home-button {
    position: absolute;
    top: 30px;
    left: 30px;
    color: #888888;
    text-decoration: none;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    padding: 6px 0;
    border-bottom: 1px solid transparent;
}

.wod-home-button:hover {
    color: #2a2a2a;
    border-bottom-color: #2a2a2a;
}

.wod-title {
    color: #2a2a2a;
    margin-bottom: 48px;
    font-size: 3em;
    text-align: center;
    font-weight: 200;
    letter-spacing: -1px;
    position: relative;
}

.wod-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: #2a2a2a;
    margin: 24px auto 0;
}

.wod-setup-form {
    max-width: 500px;
    margin: 0 auto;
}

.wod-form-group {
    margin-bottom: 32px;
}

.wod-form-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 300;
    color: #4a4a4a;
    font-size: 15px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.wod-form-group input[type="number"],
.wod-form-group select {
    width: 100%;
    padding: 16px 18px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 17px;
    transition: all 0.2s ease;
    background: #fafafa;
    font-weight: 300;
    font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
}

.wod-form-group input[type="number"]:focus,
.wod-form-group select:focus {
    outline: none;
    border-color: #2a2a2a;
    background: white;
    box-shadow: 0 0 0 3px rgba(42, 42, 42, 0.05);
}

.wod-button {
    background: #2a2a2a;
    color: white;
    border: none;
    padding: 18px 36px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    font-weight: 400;
    transition: all 0.2s ease;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.wod-button:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(42, 42, 42, 0.2);
}

.wod-button:active {
    transform: translateY(0);
}

.wod-stats-bar {
    display: flex;
    justify-content: space-around;
    margin-bottom: 32px;
    padding: 28px;
    background: #fafafa;
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 24px;
    border: 1px solid #e8e8e8;
}

.wod-stat {
    text-align: center;
    min-width: 150px;
}

.wod-stat-label {
    font-size: 14px;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    font-weight: 400;
}

.wod-stat-value {
    font-size: 36px;
    font-weight: 200;
    color: #2a2a2a;
    margin-top: 10px;
    letter-spacing: -1px;
}

.wod-writing-area {
    position: relative;
}

.wod-resize-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
    flex-wrap: wrap;
}

.wod-resize-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wod-resize-label {
    font-size: 14px;
    color: #888888;
    font-weight: 400;
    margin-right: 4px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.wod-resize-button {
    background: white;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
    color: #2a2a2a;
    font-weight: 300;
}

.wod-resize-button:hover {
    border-color: #2a2a2a;
    background: #f5f5f5;
    transform: scale(1.05);
}

.wod-resize-button:active {
    transform: scale(0.95);
}

.wod-textarea-container {
    margin: 0 auto;
    transition: max-width 0.3s ease;
}

.wod-textarea {
    width: 100%;
    min-height: 450px;
    padding: 28px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 20px;
    line-height: 1.8;
    resize: vertical;
    font-family: 'Georgia', serif;
    background: white;
    transition: all 0.2s ease;
    font-weight: 300;
    color: #2a2a2a;
}

.wod-textarea:focus {
    outline: none;
    border-color: #2a2a2a;
    box-shadow: 0 0 0 3px rgba(42, 42, 42, 0.05);
}

.wod-warning-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 0, 0, 0.1);
    pointer-events: none;
    z-index: 1000;
    animation: wod-pulse 0.5s ease-in-out infinite;
}

@keyframes wod-pulse {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.3; }
}

.wod-warning-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.95);
    color: white;
    padding: 30px 50px;
    border-radius: 15px;
    font-size: 24px;
    font-weight: 700;
    z-index: 1001;
    pointer-events: none;
    animation: wod-shake 0.5s ease-in-out infinite;
}

@keyframes wod-shake {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    25% { transform: translate(-50%, -50%) rotate(-2deg); }
    75% { transform: translate(-50%, -50%) rotate(2deg); }
}

.wod-action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.wod-action-buttons button {
    flex: 1;
    min-width: 150px;
}

.wod-secondary-button {
    background: #6b6b6b;
}

.wod-secondary-button:hover {
    background: #5a5a5a;
    box-shadow: 0 4px 12px rgba(107, 107, 107, 0.2);
}

.wod-danger-button {
    background: #c44545;
}

.wod-danger-button:hover {
    background: #b03838;
    box-shadow: 0 4px 12px rgba(196, 69, 69, 0.2);
}

.wod-autosave-indicator {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #888888;
    font-weight: 300;
    letter-spacing: 0.3px;
}

.wod-progress-bar {
    width: 100%;
    height: 4px;
    background: #e8e8e8;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 12px;
}

.wod-progress-fill {
    height: 100%;
    background: #2a2a2a;
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* Screen shake animation */
@keyframes screen-shake {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-2px, -2px); }
    20% { transform: translate(2px, 2px); }
    30% { transform: translate(-2px, 2px); }
    40% { transform: translate(2px, -2px); }
    50% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    70% { transform: translate(-2px, 2px); }
    80% { transform: translate(2px, -2px); }
    90% { transform: translate(-2px, -2px); }
}

.wod-screen-shake {
    animation: screen-shake 0.5s ease-in-out infinite;
}

/* Modal styles */
.wod-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.wod-modal {
    background: white;
    border-radius: 8px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid #e0e0e0;
}

.wod-modal h2 {
    color: #2a2a2a;
    font-size: 26px;
    margin-bottom: 16px;
    font-weight: 300;
    letter-spacing: -0.5px;
}

.wod-modal p {
    color: #5a5a5a;
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 32px;
    font-weight: 300;
}

.wod-modal-buttons {
    display: flex;
    gap: 12px;
}

.wod-modal-buttons button {
    flex: 1;
    padding: 16px 28px;
    border-radius: 6px;
    border: none;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.wod-modal-primary {
    background: #2a2a2a;
    color: white;
}

.wod-modal-primary:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(42, 42, 42, 0.2);
}

.wod-modal-secondary {
    background: #f0f0f0;
    color: #2a2a2a;
}

.wod-modal-secondary:hover {
    background: #e0e0e0;
}

/* Emergency pause section - subtle styling */
.wod-emergency-pause-section {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #e8e8e8;
}

.wod-emergency-pause-section label {
    color: #999999;
    font-size: 13px;
}

.wod-emergency-pause-section input {
    background: #fafafa;
    border-color: #e8e8e8;
}

.wod-emergency-pause-section small {
    color: #999999;
}

/* Fullscreen button */
.wod-fullscreen-button {
    background: #4a9b5f;
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.wod-fullscreen-button:hover {
    background: #3d8550;
    transform: translateY(-1px);
}

/* Fullscreen mode styles */
.wod-writing-screen.wod-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    background: white;
    padding: 0;
    margin: 0;
}

.wod-fullscreen .wod-writing-area {
    height: 100vh;
    max-width: 100%;
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.wod-fullscreen .wod-textarea-container {
    width: 100%;
    margin: 0 auto;
}

.wod-fullscreen .wod-textarea {
    height: calc(100vh - 160px) !important;
    min-height: calc(100vh - 160px) !important;
    font-size: 22px;
    line-height: 1.8;
    border: none;
    background: transparent;
    width: 100%;
}

.wod-fullscreen .wod-resize-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Fullscreen save button */
.wod-fullscreen-save-button {
    background: #2a2a2a;
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.wod-fullscreen-save-button:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
}

/* Red tint overlay - progressive visual consequence */
.wod-red-tint-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.6), rgba(153, 27, 27, 0.8));
    pointer-events: none;
    transition: none; /* Remove transition for immediate opacity updates */
    z-index: 100;
}

.wod-writing-screen {
    position: relative;
}

.wod-writing-area {
    position: relative;
    z-index: 101; /* Above red tint but allows tint to show through */
}

.wod-textarea-container {
    position: relative;
    z-index: 102;
}

/* Text blur - progressive visual consequence */
.wod-textarea {
    transition: filter 0.3s ease;
}

@media (max-width: 768px) {
    .wod-stats-bar {
        flex-direction: column;
    }
    
    .wod-action-buttons {
        flex-direction: column;
    }
    
    .wod-action-buttons button {
        width: 100%;
    }
}
