* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 5vh;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    margin: 20px;
    width: 100%;
    max-width: 800px;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 15px;
    font-size: 2em;
}

.file-input-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.file-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.file-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.file-label svg {
    width: 24px;
    height: 24px;
}

.file-name {
    color: #667eea;
    font-weight: 600;
    font-size: 0.95em;
    text-align: center;
    min-height: 20px;
    padding: 15px;
}

.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    gap: 15px;
}

.controls label {
    font-weight: 600;
    color: #555;
    font-size: 1.1em;
}

.word-position-control {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
}

.word-position-control label {
    font-weight: 600;
    color: #555;
    font-size: 1.1em;
}

#wordPosition {
    padding: 10px 15px;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 1em;
    width: 100px;
    text-align: center;
    background: white;
    color: #333;
    outline: none;
    transition: all 0.3s ease;
}

#wordPosition:hover,
#wordPosition:focus {
    border-color: #764ba2;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.total-words {
    font-weight: 600;
    color: #667eea;
    font-size: 1.1em;
}

#speed {
    padding: 10px 15px;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    background: white;
    color: #333;
    outline: none;
    transition: all 0.3s ease;
}

#speed:hover {
    border-color: #764ba2;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

#textInput {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1em;
    resize: vertical;
    margin-bottom: 20px;
    font-family: inherit;
    transition: all 0.3s ease;
}

#textInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#textInput.hidden {
    display: none;
}

.timer {
    text-align: center;
    font-size: 2.5em;
    font-weight: 700;
    color: #667eea;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    letter-spacing: 3px;
    display: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.timer.active {
    display: block;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-bottom: 0px;
}

#startStopBtn {
    flex: 2;
    padding: 15px;
    font-size: 1.2em;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#startStopBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

#startStopBtn:active {
    transform: translateY(0);
}

#startStopBtn.resume-mode {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

#startStopBtn.resume-mode:hover {
    box-shadow: 0 5px 20px rgba(39, 174, 96, 0.4);
}

.reset-btn {
    flex: 1;
    padding: 15px;
    font-size: 1.1em;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(231, 76, 60, 0.4);
}

.reset-btn:active {
    transform: translateY(0);
}

.word-display {
    min-height: 150px;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 3em;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    word-wrap: break-word;
}

.word-display.active {
    display: flex;
}

/* Tam ekran mod */
body.fullscreen-mode {
    background: #f8f9fa;
    padding: 0;
}

body.fullscreen-mode .container {
    display: none;
}

.fullscreen-word-display {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #f8f9fa;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 4em;
    font-weight: bold;
    color: #333;
    text-align: center;
    padding: 20px;
    word-wrap: break-word;
    cursor: pointer;
    z-index: 9999;
}

.fullscreen-word-display.active {
    display: flex;
}

@media (max-width: 600px) {
    .fullscreen-word-display {
        font-size: 2.5em;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
        min-width: 300px;
    }

    h1 {
        font-size: 2em;
    }

    .word-display {
        font-size: 2em;
    }

    .controls {
        flex-direction: column;
    }
}
