<?php
// Sprint UX: rediseño para alinear con votacionFinalizado.php
require_once 'app/models/conexion.php';
require_once 'datos.php';

session_start();
$celular = $_SESSION['celular'] ?? '';
session_unset();
session_destroy();
session_write_close();
setcookie(session_name(), '', 0, '/');
?>
<!doctype html>
<html lang="es">
<head>
    <meta charset="UTF-8">
    <?php require 'head.php' ?>
    <link href="assets/css/estilos.css" rel="stylesheet">
    <style>
        body.bg-dinamico { min-height:100vh; display:flex; align-items:center; justify-content:center; flex-direction:column; }
        .wrap-conf {
            max-width: 560px; width: 92%;
            margin: 0 auto; padding: 16px;
        }
        .card-conf {
            background: rgba(255,255,255,.95);
            border: none; border-radius: 22px;
            box-shadow: 0 10px 50px rgba(0,0,0,.2);
            padding: 48px 36px 40px;
            text-align: center;
            backdrop-filter: blur(8px);
        }
        .check-circle {
            width: 78px; height: 78px; border-radius: 50%;
            background: linear-gradient(135deg,#17c1e8,#28a745);
            display: inline-flex; align-items: center;
            justify-content: center; margin-bottom: 22px;
        }
        .check-circle svg { width:38px;height:38px;fill:none;stroke:#fff;stroke-width:3;stroke-linecap:round;stroke-linejoin:round; }
        .titulo-conf { color:#2b5a9e;font-size:1.5em;font-weight:700;margin-bottom:10px; }
        .msg-conf { font-size:1em;color:#444;line-height:1.6;margin-bottom:28px; }
        .btn-inicio {
            display:inline-block;
            background:linear-gradient(135deg,#17c1e8,#2b5a9e);
            color:#fff;border:none;border-radius:25px;
            padding:12px 42px;font-size:.95em;font-weight:600;
            text-decoration:none;transition:opacity .2s,transform .15s;
        }
        .btn-inicio:hover { opacity:.88;transform:translateY(-1px);color:#fff; }
        footer { text-align:center;font-size:.8em;color:rgba(255,255,255,.75);margin-top:28px;padding-bottom:16px; }
        footer a { color:rgba(255,255,255,.75);text-decoration:none; }
    </style>
</head>
<body class="bg-dinamico">

<div class="wrap-conf">
    <div class="card-conf">
        <div class="check-circle">
            <svg viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"/></svg>
        </div>
        <p class="titulo-conf">Voto Registrado</p>
        <hr style="border:none;border-top:1px solid #eef2f7;margin:14px 0;">
        <p class="msg-conf"><?php echo htmlspecialchars($mensajeVoto); ?></p>
        <a href="index.php" class="btn-inicio">Volver al inicio</a>
    </div>
</div>

<footer>
    Copyright 2012 - 2026
    <a href="https://fyclsingenieria.com/">FYCLS S.A.S</a>
</footer>

</body>
</html>
